Git Commands
Git Commands
2. Repository Basics
3. Branching
6. Stashing Changes
git reset --soft HEAD~1 # Undo last commit, keep changes staged
git reset --mixed HEAD~1 # Undo last commit, keep changes unstaged
git reset --hard HEAD~1 # Completely remove last commit
git checkout -- <file> # Discard changes in a file
9. Remote Management
If you want a printable cheat sheet PDF or want to practice Git hands-on using GitHub,
I can help with that too. Just say the word!