If Git feels like magic sometimes, here’s a cheat sheet that breaks it down with simple analogies. Think of Git as your time-traveling journal for code. Here's how the commands work, in human terms
🔧 git init
"Starting a journal"
You’re opening a fresh notebook to begin tracking your code changes.
_
➕ git add
"Marking a page for publishing"
_You’ve written something and now you're folding the corner of the page to say, "This is worth saving."
📝 git commit -m "
"Locking it in with a title"
You give the saved page a name and archive it in your notebook.
🌿 git branch
"Looking at alternate storylines"
See the different timelines your project is exploring.
🌱 git branch
"Starting a new storyline"
You begin a new chapter without messing up the main one.
🔍 git status
"Asking, 'What’s changed?'"
You check what’s written, saved, or still in draft.
📜 git log
"Flipping back through your journal"
Look at every change you’ve ever made, in order.
🕵️ git blame
"Who wrote this line?"
Track down who changed what and when — no judgment, just facts.
🔄 git checkout
"Switching to a different timeline"
Jump into another version of your project.
📬 git fetch
"Checking your mailbox"
You peek at updates from the remote repo but don’t open them yet.
🤝 git merge
"Combining two timelines"
Bring changes from another storyline into your current one — without rewriting history.
🌐 git pull
"Check your mail and apply the updates"
You get the latest changes and paste them right into your notebook.
❌ git rm --cached *
"Unmarking saved pages"
You tell Git to stop tracking files — like removing sticky notes without deleting the actual pages.
🔧 git config --list
"Looking at your Git settings"
See your preferences and ID cards Git uses for tracking.
💼 git stash
"Temporarily hiding your work"
Tuck your changes in a drawer so you can switch tasks, then bring them back later.
🕰️ git reset --hard HEAD~1
"Undo like you mean it"
You rip out your last journal page — poof, it’s gone. Use with care.
Feel like a Git wizard yet? Keep this as your spellbook. 🧙♂️✨