简体   繁体   English

Egit将所有文件显示为已更改

[英]Egit shows all files as changed

I'm working with Git on my Windows 7 PC on the command line and with TortoiseGit. 我在命令行和我的Windows 7 PC上使用Git和TortoiseGit。 This works fine. 这很好用。 Now I've installed EGit for Eclipse. 现在我已经为Eclipse安装了EGit。 EGit is showing all files as changed although git status correctly reports, that there are no changes. EGit显示所有文件已更改,尽管git status正确报告,没有更改。

Any idea what's wrong? 知道什么是错的吗?

I also had the similar issue, I have changed the below property of repository setting under Git configuration in eclipse 我也有类似的问题,我在eclipse中改变了Git配置下的存储库设置的下面属性

autocrlf = false 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 没有任何改变,但是eclipse egit将文件标记为已更改

Basically I added this property as true in order to address ctrl+M chars in script files. 基本上我将此属性添加为true以便在脚本文件中解决ctrl + M chars。 Now I am not sure how to address this issue. 现在我不确定如何解决这个问题。 Any thought on this, please share. 有任何想法,请分享。

This is a late response, but I recently ran into this same problem when initially cloning a git repository. 这是一个迟到的响应,但我最近在最初克隆git存储库时遇到了同样的问题。 EGit was showing all files as changed even though it had just been cloned and git bash showed no changes in the files. EGit显示所有文件都已更改,即使它刚刚被克隆并且git bash显示文件没有变化。

Since you usually don't want autocrlf = false on Windows machines, I left autocrlf = true and cloned the repository. 由于您通常不希望在Windows机器上使用autocrlf = false,因此我离开了autocrlf = true并克隆了存储库。 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 . 然后在EGit中我对所有文件进行了虚假更改,最后在git bash中使用git reset --hard HEAD^1恢复到之前的提交。 This tricked EGit into thinking the line endings were correct without needing to touch the actual repository. 这使得EGit认为线条结尾是正确的而无需触及实际的存储库。 Commits and pulls after this point haven't reproduced the EGit confusion in my configuration. 在这一点之后提交和拉动没有重现我的配置中的EGit混淆。 Additionally no unexpected line ending changes occur when I push to the repository. 另外,当我推送到存储库时,不会发生意外的行结束更改。

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). 最后通过使用Windows安装的Git Bash重新克隆存储库来解决问题(我之前在Cygwin中使用Git进行了克隆)。

I'm posting this as another answer just in case someone else is in the same boat as me. 我发布这个作为另一个答案,以防万一其他人和我在同一条船上。

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. 然后将core.autocrlf更改为false,并将core.whitespace设置为空字符串。

This works fine for .java files but .xml files and .xsd files are still causing this issue! 这适用于.java文件,但.xml文件和.xsd文件仍然导致此问题!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM