FundamentalsBeginner12 min
Git without fear
Branch, commit, and recover from mistakes without memorizing a hundred commands.
By Maya Chen · 2026-03-12
Why this exists
Most Git tutorials dump every flag on day one. You need three moves: save work, share work, undo work.
The daily loop
git statusbefore you touch anything- Small commits with verbs in the message
- Push when the branch is ready for eyes
Undo without panic
| Situation | Safe move |
|---|---|
| Bad last commit message | git commit --amend (unpushed only) |
| Want old file back | git checkout -- path or restore |
| Branch is a mess | New branch from main, cherry-pick keepers |
Practice
Break a toy repo on purpose. Fix it. Confidence comes from recovery, not perfection.
Code sample
git switch -c fix/readme
git add README.md
git commit -m "Clarify local setup steps"
git push -u origin HEAD