Egit 显示所有文件已更改
我在 Windows 7 PC 上通过命令行和 TortoiseGit 使用 Git。这很好用。现在我已经为 Eclipse 安装了 Egit。尽管 git status 正确报告没有任何更改,但 Egit 显示所有文件已更改。
知道出了什么问题吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我也遇到了类似的问题,我在 eclipse
autocrlf = false
中的 Git 配置下更改了存储库设置的以下属性这解决了问题
您也可以从以下链接获取更多详细信息:
没有任何更改,但 eclipse egit 将文件标记为已更改
基本上,我将此属性添加为 true 是为了解决脚本文件中的 ctrl+M 字符。
现在我不知道如何解决这个问题。对此有什么想法,请分享。
I also had the similar issue, I have changed the below property of repository setting under Git configuration in eclipse
autocrlf = false
This fixed the problem
You can get more details from the below link too:
There is nothing changed, but eclipse egit marks the file as changed
Basically I added this property as true in order to address ctrl+M chars in script files.
Now I am not sure how to address this issue. Any thought on this, please share.
这是一个迟到的回复,但我最近在最初克隆 git 存储库时遇到了同样的问题。 EGit 显示所有文件已更改,即使它刚刚被克隆,并且 git bash 显示文件中没有更改。
由于您通常不希望在 Windows 计算机上使用 autocrlf = false,因此我保留了 autocrlf = true 并克隆了存储库。然后在 EGit 中,我向所有文件提交了虚假更改,最后在 git bash 中使用 git reset --hard HEAD^1 恢复到之前的提交。这欺骗了 EGit 认为行结尾是正确的,而不需要接触实际的存储库。此后的提交和拉取并未在我的配置中重现 EGit 混乱。此外,当我推送到存储库时,不会发生意外的行结束更改。
This is a late response, but I recently ran into this same problem when initially cloning a git repository. EGit was showing all files as changed even though it had just been cloned and git bash showed no changes in the files.
Since you usually don't want autocrlf = false on Windows machines, I left autocrlf = true and cloned the repository. Then in EGit I commited the faux changes to all files and finally in git bash reverted to the previous commit with
git reset --hard HEAD^1
. This tricked EGit into thinking the line endings were correct without needing to touch the actual repository. Commits and pulls after this point haven't reproduced the EGit confusion in my configuration. Additionally no unexpected line ending changes occur when I push to the repository.我从来无法让任何建议的解决方案发挥作用。我最终通过使用 Windows 安装的 Git Bash 重新克隆存储库来解决该问题(我之前在 Cygwin 中使用 Git 进行了克隆)。
我将其作为另一个答案发布,以防其他人与我处境相同。
I was never able to get any of the suggested solutions to work. I ended-up fixing the issue by re-cloning the repository with the Windows installed Git Bash (I had cloned using Git within Cygwin previously).
I'm posting this as another answer just in case someone else is in the same boat as me.
我也遇到了这个问题,这让我发疯了!它一直说“签出与文件冲突:”
无论如何,我设法(某种程度上)使用以下组合解决了这个问题:
团队->高级->假定导致冲突的资源未更改
然后将 core.autocrlf 更改为 false,并将 core.whitespace 设置为空字符串。
这对于 .java 文件效果很好,但 .xml 文件和 .xsd 文件仍然会导致此问题!
I was also having this issue and it was driving me crazy! It kepts saying 'Checkout conflicts with file:'
Anyway I managed to (kind of) fix this using a combination of the following:
Team -> Advanced -> Assumed Unchanged on the resource causing the conflict
Then change core.autocrlf to false and also set core.whitespace to empty string.
This works fine for .java files but .xml files and .xsd files are still causing this issue!