Git

37 notes in this chapter

Git Terms MOC

37 Git commands across 10 categories. Each note has: syntax, common options explained, a basic example, an extended real-world example, common pitfalls, and related commands.

Setup & Configuration

Basic Snapshotting

Inspecting & Comparing

Branching & Merging

Remote & Collaboration

Undoing & Rewriting History

Stashing

Tagging & Releases

Advanced & Internals

Hooks & Automation


How to use this

Use it as a lookup, not a read-front-to-back reference. When a tutorial or job posting mentions a command you don’t recognize, check here first.

Suggested order if starting from zero

  1. git init → git add → git commit → git status → git diff — the absolute daily loop
  2. git branch → git checkout/switch → git merge — working with more than one line of work
  3. git remote → git fetch → git pull → git push — working with GitHub/GitLab
  4. git log → git stash → git rebase — once the basics are automatic
  5. git reset vs git revert vs git restore — learn these together, they’re constantly confused with each other
  6. Everything in Advanced & Internals — only when you actually hit the problem it solves (lost commit, need to bisect a bug, etc.), not before

Dig deeper