Skip to content

Git

The backbone of everything else. Learn in layers — don’t jump to worktrees before you’re calm with branch + push.

Mental model

text
working tree  →  stage (index)  →  commit  →  remote branch
     ↑                                              │
     └──────────── pull / fetch + merge/rebase ─────┘

Companion tools

Safety rules (tattoo these)

  1. Prefer git push --force-with-lease over --force
  2. Never force-push main / master / shared release branches
  3. reflog is your undo for almost everything local
  4. On WSL: keep repos under ~/, not /mnt/c/