Practice this fail.
Undo without time travel.
Git · Restart as often as you like
Read the error, choose a command, and learn
why it works. Nothing runs on your machine.
HEAD is a published, ordinary non-merge commit that should be undone. Your working tree is clean. Keep shared history and create a new reversing commit.
Undo without time travel.
$ git log -1 --oneline
cafe123 Ship the wrong default
Which command creates a new commit reversing HEAD?
Fixed. By hand.
git revert HEADRevert records a new commit that reverses the selected commit. It preserves the earlier commit in history, which makes it suitable for undoing a published change without rewriting the branch.
Practice does not affect your daily score or streak.