Rana Maninder Singh
Lesson 1 of 8Git & GitHub

Git & GitHub — Why Version Control Exists

Lesson opener

In one line: What problem Git solves (and why final_v3_REAL.xlsx is not a strategy).

Why it matters: This shows up at work when you need to what problem Git solves (and why final_v3_REAL.xlsx is not a strategy).

Before this lesson: None - if you can save a file, you can learn Git

Before you start

ResourceLink
PreviousGit & workflow (Setup)
NextInstall Git & first repo
PrerequisitesNone — if you can save a file, you can learn Git
Time~40 minutes
What you needA computer (Windows, Mac, or Linux)

Quick install only? Setup: Git & workflow is a 15-minute shortcut. This course goes start to finish — local Git, GitHub, teams, deployment, and 2026 workflows.


What you will learn

  • What problem Git solves (and why final_v3_REAL.xlsx is not a strategy)
  • Git vs GitHub — local tool vs cloud hosting
  • The three areas of Git: working directory, staging, repository
  • Mental model every professional uses before typing commands

Section 1 — The honest framing

Plain English:

If you only ever work alone on one laptop, you might think: "I'll just copy folders." That breaks the moment you:

Git is a time machine for your project folder. Each commit is a labeled snapshot you can return to.

GitHub is a website that stores copies of Git repos online — backup, sharing, code review, and automation.

Saving files manuallyGit
HistoryFolder names like backup_oldgit log — full timeline
UndoHope you kept a copygit restore / checkout a commit
CollaborationEmail ZIP filesPush/pull same repo
Deployment"Which folder was live?"Tag a release, CI deploys that commit

Section 2 — Git vs GitHub (do not confuse them)


Section 3 — The three-tree model

Every change flows through three states:

  1. Working directory — files you edit (like any folder)
  2. Staging area (git add) — "include these in the next snapshot"
  3. Repository (git commit) — permanent snapshot in history

Why staging? You can commit part of your changes while keeping other edits unfinished — essential on real teams.


Section 4 — Who uses this in 2026?

RoleTypical Git use
Web developerFeature branches, pull requests, deploy from main
Data analystVersion SQL scripts and notebooks
Mobile (React Native)Same repo for Android + iOS — you already used Git in android8
DevOpsGitHub Actions run tests on every push
Solo learnerBackup + portfolio on GitHub

Every course on this site — Python, SQL, Power BI exports — benefits from Git discipline.


Section 5 — What you will not learn by guessing

s:**

- Thinking GitHub is Git (it's hosting, not the tool)

- Committing passwords or API keys (stores reject apps; employers fire people)

- Giant commits with 50 unrelated files (use small, logical commits)

- Panic when you see a merge conflict (it's normal — git4 teaches the fix)


Practice

Do this now (no install yet): List three files in a project you'd want to "time travel" back to. Write one sentence describing what a good commit message would say for each.

Example: "Add Q3 pivot table — fixes #12 wrong region totals"

Checklist

  • [ ] I can explain Git vs GitHub in one sentence each
  • [ ] I know the three states: working → staging → commit
  • [ ] I understand why manual final_v2 folders fail

Teacher walkthrough: replace final_v3 folders

All figures illustrative.

Step 1 — Name the pain. List three times folder copies failed (lost edits, wrong deploy, cannot compare).

Step 2 — Map to Git. Each pain → commit history, branch, or push backup.

Step 3 — Three trees. Edit in working dir → git add stage → git commit snapshot.

Step 4 — Git vs GitHub. Local commits work offline; GitHub is remote hosting/review.

Failure example: emailed ZIP as source of truth

Symptom: Two analysts overwrote each other's pivot; nobody knew whose file was live.

Diagnosis: No shared history; filenames lied (FINAL_REAL).

Correction: One repo; small commits; PR or paired review for shared files.

Validation: git log shows who changed the pivot and when.

Guided practice

Is GitHub required to make a commit? One sentence.

Complete solution: No — Git commits locally; GitHub is optional remote hosting until you need backup/collaboration.

Independent practice

Acceptance criteria:

Common mistakes

  1. Equating GitHub with Git.
  2. Giant unrelated commits.
  3. Committing .env / keys.

What's next

Install Git & your first repo — install, git init, first commit, and .gitignore.