Chapter 56: Git Study Plan

Git Study Plan – 6 Weeks to “I’m confident in interviews & daily work”

Total time commitment ≈ 60–90 minutes / day, 5–6 days/week (Realistic for people who have jobs / college)

Core philosophy of this plan

  • 70% hands-on typing in terminal
  • 20% reading good documentation / watching short videos
  • 10% explaining concepts out loud / writing notes / teaching imaginary friend
  • Deliberate practice of painful scenarios (conflicts, resets, recovery)

Week 0 – Setup & First Mindset (2–4 days)

Goal: Remove fear, install good defaults, build confidence

Day 0 – Install & configure (30–60 min)

  • Download Git → https://git-scm.com/downloads
  • Windows → choose “Use Git from Git Bash and Command Prompt” during install
  • macOS/Linux → already there or brew install git / sudo apt install git
  • Set identity (appears on every commit)
Bash
  • Modern defaults (2026 must-have)
Bash
  • Create pretty log alias (you will use this 50 times a day)
Bash

Day 1 – First repo + muscle memory (60 min)

Create folder → git init → add file → commit → amend → reset –mixed → reflog recover

Repeat 5–8 times until you can do the whole cycle in < 90 seconds without looking notes.

Day 2 – Read these three short pages (must-read)

  1. https://git-scm.com/book/en/v2/Getting-Started-Git-Basics
  2. https://github.com/git-guides
  3. https://ohmygit.org/ (play the game 2–3 levels)

Week 1 – Survival Kit (Daily 60–90 min)

Goal: Never feel lost when alone with Git

Topics & Exercises

  1. status / diff / add / commit / log / show / restore
  2. amend (message + forgot file)
  3. reset soft/mixed/hard + HEAD~n
  4. checkout / switch / restore (file vs branch)
  5. stash push/pop/list/apply/drop
  6. reflog (recover after reset –hard / bad rebase)

Daily drill (repeat 15–25 times)

  • Make 3–5 changes
  • Stage partially (git add -p)
  • Commit → amend → forget file → amend again
  • reset –mixed HEAD~1 → re-commit better
  • reset –hard → panic → reflog → recover
  • stash messy changes → switch branch → pop

End of week checkpoint Can you recover from git reset –hard HEAD~3 in under 60 seconds? If yes → move to week 2. If no → repeat 2 more days.

Week 2 – Branching & History (Daily 60–90 min)

Goal: Feel safe doing parallel work + clean history

Topics & Exercises

  1. branch / switch / checkout -b
  2. merge (fast-forward vs true merge commit)
  3. merge conflict resolution (markers, add, commit)
  4. rebase basic + conflict resolution
  5. rebase vs merge — when to choose what
  6. interactive rebase (-i): squash / fixup / reword / edit / drop
  7. cherry-pick (single commit transplant)

Daily drill

  • Create feature branch → 5 messy commits
  • rebase -i → squash into 1–2 clean commits
  • merge to main → delete branch
  • Create conflict on purpose → resolve in VS Code
  • Cherry-pick one commit from another branch

End of week checkpoint Can you clean 6 messy commits into 2 nice ones with rebase -i in < 4 minutes? Can you resolve a 3-file conflict without panic? If yes → week 3.

Week 3 – Remote + GitHub Reality (Daily 60–90 min)

Goal: Work with GitHub like a professional

Topics & Exercises

  1. remote add / set-url / rename / remove
  2. push / pull / fetch / fetch –prune
  3. push -u (upstream tracking)
  4. push –force-with-lease
  5. origin + upstream pattern (fork workflow)
  6. pull –rebase vs pull (merge)
  7. Protected branches + required PR reviews (simulate on your repo)

Daily drill

  • Fork any beginner-friendly repo (public-apis, freeCodeCamp, etc.)
  • Clone your fork → add upstream → sync main
  • Create feature branch → push → create PR → simulate review → merge
  • Practice force-with-lease after rebase

End of week checkpoint You can do the full “fork → sync → branch → PR → merge” cycle in < 10 minutes.

Week 4 – Quality & Safety Layers (Daily 60–90 min)

Goal: Never commit garbage again

Topics & Exercises

  1. .gitignore (global + per-repo + negation !)
  2. .gitattributes (eol=lf/crlf, text/binary)
  3. Git LFS (track large files, migrate existing)
  4. pre-commit hooks (Husky / lefthook) – lint, test, secrets scan
  5. commit-msg hook – Conventional Commits
  6. Signed commits (GPG / SSH) – verified badge

Daily drill

  • Create .gitignore for your stack (Node, Python, Java…)
  • Add .gitattributes → test LF/CRLF behavior
  • Set up Husky → pre-commit runs ESLint + Prettier + no-secrets
  • Sign one commit → check green “Verified” on GitHub

Week 5–6 – Advanced Surgery & Recovery (Daily 45–90 min)

Goal: Fearless history rewriting

Topics & Exercises

  1. reflog recovery (after reset / rebase / amend)
  2. revert (safe undo for pushed commits)
  3. reset (soft/mixed/hard) – local cleanup
  4. rebase -i advanced (split commit, exec shell)
  5. filter-repo / BFG (remove secrets / large files from history)
  6. git bisect (find bug commit)
  7. git worktree (multiple branches checked out)

Daily drill

  • Intentionally break history 3 ways → recover with reflog every time
  • Rebase -i to split one commit into two
  • Use filter-repo to remove fake secret from history
  • git bisect on a small repo to find “when bug started”

Week 7+ – Real-World Application & Contribution

Goal: Apply in real life

  1. Contribute to 3–5 real open-source repos (typo → docs → small feature)
  2. Set up GitHub Actions CI for your personal project
  3. Simulate team workflow (PR reviews, merge conflicts, rebase before PR)
  4. Teach Git to a friend / junior — explaining = deepest learning

Final Recommended Tools Stack (2026)

  • Terminal + aliases (must)
  • VS Code Git panel (very good built-in)
  • GitHub Desktop / GitKraken / Fork (visual graph & conflict resolver)
  • Husky / lefthook (hooks)
  • git-filter-repo (history cleanup)
  • git-lfs (large files)

7-Day Challenge Suggestion (if you want to start right now)

Day 1 – Setup + 20× basic commit cycle + amend Day 2 – Branch → merge → conflict resolution (3×) Day 3 – Rebase basic + rebase -i (squash 6 → 2 commits) Day 4 – Reset soft/mixed/hard → reflog recover (5×) Day 5 – Fork → upstream → sync → PR cycle (2×) Day 6 – .gitignore + .gitattributes + Husky pre-commit Day 7 – Cherry-pick + revert + bisect small exercise

Which day / phase do you want to start with right now? Or want me to give you a personalized 7-day plan based on what you feel weakest at?

Tell me — we’ll keep going until you feel completely confident. You’ve already come incredibly far — let’s make sure it sticks forever. 🚀

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *