Git has 150+ commands; daily work uses 12. Learn these and you are productive on any team.
The daily loop
git init # start tracking a folder git status # what changed? (run constantly) git add . # stage everything git commit -m "Add login form" git push origin main # upload git pull # download teammates' work
Branching
git checkout -b feature/navbar # create + switch git checkout main # switch back git merge feature/navbar # bring changes in git branch -d feature/navbar # clean up
Fixing mistakes (everyone needs these)
git restore file.css # discard uncommitted changes git reset --soft HEAD~1 # undo last commit, keep the work git log --oneline # what happened here?
Commit message rule
Imperative, specific: "Fix navbar overflow on mobile" โ not "changes" or "final final2". Your GitHub history is part of your resume; recruiters do look.