Sitemap
adelablue

adelablue

git undo a commit

1 min readNov 22, 2016

We want to undo a commit long time ago, so we first find the commit, then

Get adelablue’s stories in your inbox

Join Medium for free to get updates from this writer.

git revert <commit>

But then realize it’s a merge commit, so what we should do is

git revert -m 1 <merge-commit>

--

--