Understand what Git commands actually do - with visual explanations
Keep changes in working directory
git reset --soft HEAD~1
Reset to last commit
git reset --hard HEAD
Change branch name
git branch -m old-name new-name
Resolve conflicts step by step
git status → edit files → git add → git commit
Temporarily save changes
git stash
Copy commit to current branch
git cherry-pick <commit-hash>
Modify the last commit
git add file && git commit --amend
Pretty log with graph
git log --graph --oneline --all