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

寵の児 提交于 2019-12-03 08:09:26

I'm not quite sure whats the problem but you can reset your working copy with the follwing statement:

git reset --hard origin/master

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.

The patch from the cherry-pick does not align in terms of the seams of where the changes would be applied. Do a --no-commit to see what happens.

I've had this problem when using git on a virtual machine, where the working copy was a VMware shared folder. I don't really know what the solution is. In my case I was able to get git to move away the changes it thought existed via git stash (upon inspection appeared to be completely empty); after the changes had been moved away I could cherry-pick on top of the now clean working copy. (After this, I just deleted the stash.)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!