git revert -m 1 abc1234

Category: Git - Advanced

git revert -m 1 abc1234

Revert a merge commit

Undoes a merge by replaying its inverse against one of its parents; -m 1 selects the first parent, usually the mainline. Reverting a merge without -m fails because the direction is ambiguous. The reverted change still exists in the merged branch's history.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.