[英]Sourcetree says unstaged changes but command line doesn't
I have come across an annoying problem where my Sourcetree always thinks I have 4 outgoing changes but the command line does not. 我遇到了一个烦人的问题,我的Sourcetree始终认为我有4个传出的更改,但命令行没有。
I am not able to reset, force a clean, force a checkout, change to a clean new branch or anything of the sort to remove these files. 我无法重置,强制执行清理,强制执行检出,更改为清理新分支或进行任何此类操作以删除这些文件。 Once these files show up they are always present regardless of branch.
这些文件显示后,无论分支如何,它们始终存在。 If I change, add or remove a different file they show up correctly in both Sourcetree and git.
如果我更改,添加或删除其他文件,它们将正确显示在Sourcetree和git中。
I have seen this thread that is very similar but a big difference is their outgoing doesn't even show any changes. 我已经看到这个线程非常相似,但是最大的区别是他们的输出甚至没有显示任何更改。
Short of deleting the whole repository folder which may or may not work, can anyone think of another way to remove these? 除了删除可能无法使用的整个存储库文件夹之外,没有人能想到另一种方法来删除它们吗?
Thank you, 谢谢,
git config core.fileMode false
This appears to be an issue related to the core.fileMode setting. 这似乎是与core.fileMode设置有关的问题。 I started experiencing the reverse of this question additionally (where my Cygwin terminal started to show unstaged changes as well), and git diff on one of the files stated:
我开始另外经历了这个问题的反面(我的Cygwin终端也开始显示未进行的更改),并且其中一个文件上的git diff表示如下:
old mode 100644
new mode 100755
The solution to this was to turn that config off which seemed to fix both issues. 解决方案是关闭该配置,这似乎可以解决这两个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.