gitcherry-pick 说存在本地更改,但 gitstatus 没有说什么
$ 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)
更新 抱歉,我切换到另一个分支,然后再次切换回来,无法再重现这个:(
$ 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 :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我有这个问题。
错误是 - 错误:您的本地更改将被cherry-pick覆盖。
提示:提交您的更改或隐藏它们以继续。
致命:樱桃挑选失败
对我来说,原因是我在暂存区域中有一个我不想提交的文件。我将该文件从暂存区域移出,并尝试再次进行挑选,结果成功了。
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:
精选的补丁与应用更改的接缝处没有对齐。执行 --no-commit 看看会发生什么。
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.
就我而言,我在运行时收到错误
运行樱桃选择独立工作:
In my case, I got the error while running
Running the cherry-picks independently works:
我在虚拟机上使用 git 时遇到了这个问题,其中工作副本是 VMware 共享文件夹。我真的不知道解决方案是什么。就我而言,我能够让 git 通过 git stash 移走它认为存在的更改(经检查似乎完全是空的);更改被移走后,我可以在现在干净的工作副本之上进行挑选。 (在此之后,我刚刚删除了隐藏的内容。)
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.)我是通过谷歌搜索这个奇怪的消息来到这里的,我想表达我的两分钱。
对于有价值的事情,我的场景如下:
我确实经历了 OP 编写的内容和 < strong>我通过...除了等待什么也没做!:)
也许存在缓存或网络问题,谁知道呢。
I came here from googling about that weird message and I'd like to put my two cents.
For what is worth, my scenario is as following:
I did experienced what OP wrote and I resolved by doing... nothing but wait! :)
Maybe there was a cache or a network problem, who knows.