GitHub Guide for Students

Course Home
Why GitHub? All your project code, reports, assignments, seminar PPTs, and documentation must be pushed to a public GitHub repository. Share the repository link with your faculty for evaluation. GitHub is the industry standard for code hosting and collaboration.

System Requirements

Computer

Windows 10/11, macOS 10.15+, or Ubuntu 20.04+

Internet

Stable internet connection for push/pull operations

Storage

~500 MB free space for Git installation

Email

A valid email address for GitHub account creation

What to Push to GitHub

Recommended Folder Structure

📁 your-project-name/
├── 📁 code/
│ ├── main.py
│ ├── model_training.ipynb
│ └── utils.py
├── 📁 reports/
│ ├── project_report.pdf
│ ├── assignment_report.pdf
│ └── report_with_faq.pdf
├── 📁 presentations/
│ └── seminar_presentation.pptx
├── 📁 data/
│ └── dataset.csv (or link in README)
├── README.md
├── requirements.txt
└── .gitignore

Step-by-Step Guide

Phase 1: Installation

1

Create a GitHub Account

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.

Tip: Use your college email if possible. Choose a professional username — this will be visible to faculty and future employers.
2

Download and Install Git

Git is the version control software that runs on your computer. GitHub is the online platform.

For Windows:
1. Go to https://git-scm.com/download/win
2. Download the installer (64-bit recommended)
3. Run the installer → Click Next on every screen (keep all defaults)
4. On "Choosing the default editor" screen → Select Notepad (easier for beginners)
5. On "Adjusting PATH" screen → Select "Git from the command line and also from 3rd-party software"
6. Click Install → Wait → Click Finish
For macOS:
# Open Terminal and type:
xcode-select --install
# Click "Install" when prompted. Git comes with Xcode tools.
For Ubuntu/Linux:
sudo apt update
sudo apt install git -y
3

Verify Git Installation

Open Command Prompt (Windows) or Terminal (Mac/Linux) and type:

git --version

You should see something like: git version 2.43.0

If you see 'git' is not recognized, Git was not installed correctly. Reinstall and make sure to select "Git from the command line" during installation.
4

Configure Git with Your Name and Email

This links your commits to your identity. Use the same email as your GitHub account.

git config --global user.name "Your Full Name"
git config --global user.email "your.email@example.com"
Verify configuration:
git config --global user.name
git config --global user.email

Phase 2: Create a Repository on GitHub

5

Create a New Repository on GitHub Website

1. Log in to github.com

2. Click the "+" icon (top-right) → "New repository"

3. Fill in the details:

4. Click "Create repository"

Important: The repository MUST be Public so your faculty can view it. Private repositories require sharing access separately.
6

Copy the Repository URL

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

Phase 3: Push Your Files to GitHub

7

Clone the Repository to Your Computer

Open Command Prompt / Terminal. Navigate to where you want to store the project:

# Navigate to Desktop (or any folder you prefer)
cd Desktop

# Clone your repository (paste YOUR URL)
git clone https://github.com/your-username/agri-ai-project.git

# Enter the project folder
cd agri-ai-project
This creates a folder called agri-ai-project on your Desktop with the README file inside.
8

Add Your Files to the Project Folder

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.

9

Stage All Files for Upload

Back in Command Prompt / Terminal (make sure you're inside the project folder):

# Check which files are new or changed
git status

# Stage ALL files for upload
git add .

# Verify files are staged (should show green)
git status
The dot (.) in git add . means "add everything in the current folder." You can also add specific files: git add code/main.py
10

Commit Your Files (Save a Snapshot)

git commit -m "Add project code, report, and presentation"

The message in quotes describes what you're uploading. Make it meaningful.

If you see an error about "nothing to commit", it means you haven't added any new files, or you forgot to run git add . first.
11

Push to GitHub (Upload to the Internet)

git push origin main

The first time you push, GitHub will ask you to log in:

Password won't work! GitHub no longer accepts passwords. You need a Personal Access Token (PAT). See the troubleshooting section below.
12

Verify on GitHub Website

Go to https://github.com/your-username/agri-ai-project in your browser. You should see all your files uploaded.

13

Share the Link with Faculty

Copy the URL from your browser address bar and share it with your faculty:

https://github.com/your-username/agri-ai-project
Done! Your faculty can now view all your code, reports, and presentations by visiting this link.

Updating Files Later

14

Push Updated Files (Repeat These 3 Commands)

Whenever you modify or add new files, run these 3 commands:

# 1. Stage changes
git add .

# 2. Commit with a message
git commit -m "Update: added new analysis results"

# 3. Push to GitHub
git push origin main
Remember: The 3-step cycle is always: git add .git commit -m "message"git push origin main

Creating a Personal Access Token (PAT)

GitHub requires a PAT instead of your password for command-line access:

  1. Go to github.com/settings/tokens
  2. Click "Generate new token (classic)"
  3. Give it a name: my-laptop-token
  4. Set expiration: 90 days (or "No expiration" for convenience)
  5. Check the "repo" scope (full control of repositories)
  6. Click "Generate token"
  7. ⚠️ COPY THE TOKEN IMMEDIATELY — you won't see it again!
  8. When Git asks for your password, paste this token instead
Save the token somewhere safe (e.g., a text file on your computer). If you lose it, you'll need to generate a new one.

Writing a Good README.md

Create a file called README.md in your project root with this template:

# 🌾 [Your Project Title]

## 📋 About
[Brief description of your project - 2-3 sentences]

## 👤 Student Details
- **Name:** [Your Name]
- **USN:** [Your University Serial Number]
- **Course:** AI/ML in Agriculture - GKVK Training Program
- **Instructor:** Dr. Syed Muzamil Basha

## 📁 Repository Contents
| Folder | Contents |
|--------|----------|
| code/ | Python source code and Jupyter notebooks |
| reports/ | Project report, assignment, report with FAQ |
| presentations/ | Seminar PPT |
| data/ | Dataset files or links |

## 🛠️ How to Run
```
pip install -r requirements.txt
python code/main.py
```

## 📊 Results
[Brief summary of your results - accuracy, key findings]

## 📚 References
1. [Reference 1]
2. [Reference 2]

Git Commands Quick Reference

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

Common Errors and How to Fix Them

🔧 Installation Errors

You've successfully learned how to use GitHub. This is a valuable skill used by every software developer and data scientist in the industry. Keep using GitHub for all your future projects to build a strong portfolio.
AI Kitchen Academy — GKVK Training Program | GitHub Guide for Students
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