Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git: How do I undo a cherry-pick --no-commit that generated conflicts?

Tags:

git

git-bash

I executed a git cherry-pick XXX --no-commit. I believe this just updates the staging area and the working directory and does not commit anything. The problem is that after executing this command I got many conflicts. How do I undo this? I want to go back to the way it was before the command. I ran this on a patch branch. what command do I execute?

like image 688
Ray Avatar asked Oct 12 '25 17:10

Ray


1 Answers

git reset --hard HEAD will restore the state of last commit. (Then you'll be able to resume your cherry-picking process, or not, or in a different order.)


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!