Abort a git cherry-pick?

agmin picture agmin · May 29, 2013 · Viewed 203k times · Source

I ran git cherry-pick <hash> and had merge conflicts. I don't want to resolve the conflicts, I just want to abort the cherry-pick. When doing an actual merge (with git merge) there's the handy git merge --abort. What's the equivalent for cherry-picking?

Answer

user456814 picture user456814 · May 30, 2013

You can do the following

git cherry-pick --abort

From the git cherry-pick docs

--abort  

Cancel the operation and return to the pre-sequence state.