BACK_TO_LOGS// STEP_9_OF_10
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:

  1. Initialize Git locally: Run git init. This creates a hidden .git folder inside your project directory to start tracking changes.
  2. Stage your files: Run git add . to prepare all code, template, and document assets for tracking.
  3. Commit files: Run git commit -m "feat: complete HDI predictor system" to save your local snapshot.
  4. Rename main branch: Run git branch -M main to establish your primary branch.
  5. 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
    
  6. Push code to GitHub: Run git push -u origin main to upload your codebase remote.