HANDBOOK_GUIDE2026-06-29
Human Development Index Predictor: End-to-End Machine Learning Guide
By Rayan Syed
45 min read
Part 9: Connecting to GitHub & Pushing Your Code
Now that your machine learning model is trained and your web application is fully tested locally, you are ready to back up your codebase to GitHub.
9.1 Connecting a Local Folder to GitHub
Open your project terminal and run these commands sequentially to initialize and link your repository:
- Initialize Git locally: Run
git init. This creates a hidden.gitfolder inside your project directory to start tracking changes. - Stage your files: Run
git add .to prepare all code, template, and document assets for tracking. - Commit files: Run
git commit -m "feat: complete HDI predictor system"to save your local snapshot. - Rename main branch: Run
git branch -M mainto establish your primary branch. - Link to GitHub repository: Create a repository on GitHub, copy its URL, and run:
git remote add origin https://github.com/yourusername/hdi-predictor.git - Push code to GitHub: Run
git push -u origin mainto upload your codebase remote.