Windows 10/11, macOS 10.15+, or Ubuntu 20.04+
Stable internet connection for push/pull operations
~500 MB free space for Git installation
A valid email address for GitHub account creation
Go to https://github.com and click "Sign up".
Enter your email, create a password, choose a username (e.g., ramesh-agri-2024), and verify
your email.
Git is the version control software that runs on your computer. GitHub is the online platform.
Open Command Prompt (Windows) or Terminal (Mac/Linux) and type:
You should see something like: git version 2.43.0
'git' is not recognized, Git was not installed correctly. Reinstall and make sure to select
"Git from the command line" during installation.
This links your commits to your identity. Use the same email as your GitHub account.
1. Log in to github.com
2. Click the "+" icon (top-right) → "New repository"
3. Fill in the details:
agri-ai-project (use lowercase, hyphens, no spaces)
4. Click "Create repository"
On your new repository page, click the green "<> Code" button and copy the HTTPS URL.
It will look like: https://github.com/your-username/agri-ai-project.git
Open Command Prompt / Terminal. Navigate to where you want to store the project:
agri-ai-project on your Desktop with the README file inside.
Copy all your project files (code, reports, PPTs) into the agri-ai-project folder on your
computer. You can use File Explorer (Windows) or Finder (Mac) — just drag and drop.
Organize them into subfolders as shown in the recommended structure above.
Back in Command Prompt / Terminal (make sure you're inside the project folder):
.) in
git add . means "add everything in the current folder." You can also add specific files:
git add code/main.py
The message in quotes describes what you're uploading. Make it meaningful.
git add . first.
The first time you push, GitHub will ask you to log in:
Go to https://github.com/your-username/agri-ai-project in your browser. You should see all
your files uploaded.
Copy the URL from your browser address bar and share it with your faculty:
Whenever you modify or add new files, run these 3 commands:
git add . → git commit -m "message" →
git push origin main
GitHub requires a PAT instead of your password for command-line access:
my-laptop-tokenCreate a file called README.md in your project root with this template:
| Command | What It Does | When to Use |
|---|---|---|
git --version |
Shows installed Git version | After installation to verify |
git config --global user.name "Name" |
Sets your name for commits | One-time setup after install |
git config --global user.email "email" |
Sets your email for commits | One-time setup after install |
git clone <URL> |
Downloads a repository to your computer | First time only — to get the repo |
git status |
Shows which files are changed/new/staged | Before add/commit to check status |
git add . |
Stages all changed files for commit | After adding/modifying files |
git add filename |
Stages a specific file | When you want to commit only one file |
git commit -m "message" |
Saves a snapshot with a description | After staging files with git add |
git push origin main |
Uploads commits to GitHub | After committing to share online |
git pull origin main |
Downloads latest changes from GitHub | Before starting work (sync) |
git log --oneline |
Shows commit history (short format) | To see what you've committed |
git diff |
Shows what changed in files | Before committing to review changes |
| Error | Cause | Fix |
|---|---|---|
'git' is not recognized as an internal or external command |
Git not added to system PATH during installation | Reinstall Git and select "Git from the command line and also from 3rd-party software" option. Or add Git to PATH manually: C:\Program Files\Git\cmd |
git: command not found (Mac/Linux) |
Git not installed | Mac: Run xcode-select --install. Linux: Run sudo apt install git |