Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.
Exam details
git reset --soft HEAD~1
git reset --hard HEAD~1 ⚠ destructive.
git reset --mixed HEAD~1 (the default).
git commit --amend -m 'new message'
git add forgotten-file
git commit --amend --no-edit