$ git cherry-pick 5de83068 error: Your local changes to the following files would be overwritten by merge: Components/ApplicationEnums/Application.cs Please, commit your changes or stash them before you can merge. Aborting $ git status # On branch master nothing to commit (working directory clean)
UPDATE Sorry, I switched to another branch, and switched back again, and can't reproduce this anymore :(
It's exactly what it says: the changes you're trying to cherry-pick are already wholly contained in the branch you're on. I.e. the result of the cherry-pick is no changes. You can create an empty commit with the --allow-empty flag to indicate that you attempted to cherry-pick, but there were no changes to pull in.
In order to cherry-pick changes, you will need to identify your commit hashes. In order to see the commit hashes for your current branch, simply run the “git log” command with the “–oneline” option in order to make it more readable.
I had this issue. Error was - error: Your local changes would be overwritten by cherry-pick. hint: Commit your changes or stash them to proceed. fatal: cherry-pick failed The reason for me was I had a file in staging area that I don't wants to commit. I moved that file from staging area and tried to chery-pick again and that was a success.
I'm not quite sure whats the problem but you can reset your working copy with the follwing statement:
git reset --hard origin/master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With