$ ./guess_the_languageGit
Git · hard · #35

You are on main, which was the first parent of the merge. Which command undoes the merged-in changes?

$ git revert 77335ab
error: commit 77335ab... is a merge but no -m option was given.
fatal: revert failed
  1. git revert --no-ff 77335ab
  2. git revert -m 1 77335ab
  3. git reset --merge 77335ab
  4. git revert -m 2 77335ab
-m 1 tells Git to revert relative to the first parent (the mainline), undoing what the second parent brought in.
Play Git ▸