git cherry-pick says local changes exist, but git status says nothing

Benjol picture Benjol · Nov 24, 2010 · Viewed 13.1k times · Source
$ 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 :(

Answer

Nimmi Mathew picture Nimmi Mathew · Jan 7, 2016

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.