12

I'm working with Git on my Windows 7 PC on the command line and with TortoiseGit. This works fine. Now I've installed EGit for Eclipse. EGit is showing all files as changed although git status correctly reports, that there are no changes.

Any idea what's wrong?

Barend
  • 17,296
  • 2
  • 61
  • 80
BetaRide
  • 16,207
  • 29
  • 99
  • 177

4 Answers4

13

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.

Community
  • 1
  • 1
Lavanya
  • 319
  • 1
  • 6
  • 1
    As opposed to the mentioned post, I'm working on windows only. All other tools, including Eclipse do work fine and there are no line ending problems so far. It's only EGit showing everything as changed. Playing with line ending settings will affect the repository which is definitely not the way to go. – BetaRide Dec 16 '11 at 08:48
  • Seems to have solved my issue, it is also perhaps a good idea to change the Eclipse line endings to Unix if you are working across multiple platforms. Help > Preferences > General > Workspace > New text file line delimiter – 3urdoch May 02 '14 at 08:35
2

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.

Pyrce
  • 8,296
  • 3
  • 31
  • 46
1

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.

11101101b
  • 7,679
  • 2
  • 42
  • 52
1

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!

rash.m2k
  • 31
  • 6