Cheatsheet: Your first repo
Voice anchor
Section titled “Voice anchor”Git stores snapshots. Every other command is just navigating those snapshots.
The commands (memorize these five)
Section titled “The commands (memorize these five)”| Command | Purpose | Example |
|---|---|---|
git init | Create new repo | git init |
git status | Show current state | git status |
git add <file> | Stage a change | git add notes.txt |
git add . | Stage everything in current dir | git add . |
git commit -m "msg" | Take a snapshot | git commit -m "Add notes" |
The three areas
Section titled “The three areas”| Area | What it holds | How you change it |
|---|---|---|
| Working directory | Files as they exist on disk right now | Edit files in any way (editor, file manager) |
| Staging area | A draft of the next snapshot | git add moves changes here |
| Repository | Permanent history of all snapshots | git commit saves the staging area as a new snapshot |
Daily commit cycle
Section titled “Daily commit cycle”- Edit files
git add <files>git commit -m "meaningful message"git status(confirm clean state)
Minimal .gitignore (start here, add as needed)
Section titled “Minimal .gitignore (start here, add as needed)”# Build outputdist/build/
# Dependencies (use bare name for symlink-safe matching)node_modules
# Editor files.idea/.vscode/*.swp
# Secrets.env.env.local
# OS artifacts.DS_StoreThumbs.dbWhat’s in L3
Section titled “What’s in L3”L3 teaches commit hygiene: writing meaningful commit messages, making commits atomic (one logical change per commit), and the Conventional Commits convention popular on many teams. The mechanics are now muscle memory; L3 adds the discipline that makes the muscle memory useful over time.