2

I have a weird problem with git commit using eclipse EGit.

When I change even one line of code in a file, my commit always removes all content of that file and replaces it with the same + plus the line I have changed. So in GitHub it looks like I have changed all the lines within that file.

Note that in the commit dialog it's alright. I mean comparison of local file and the file from HEAD shows changes only in the line I really have changed.

I have the Eclipse 4.3 Kepler with the latest EGit installed.

Any hints what is going here?

Jan Krakora
  • 2,500
  • 3
  • 25
  • 52
  • Maybe line endings? https://help.github.com/articles/dealing-with-line-endings. – Aleksandr M Oct 22 '13 at 08:59
  • Yes, that was the problem. Get it to the answer so I could accept it. – Jan Krakora Oct 22 '13 at 17:06
  • Hmm... going to remove my answer as it is unclear what exactly is needed to be set. Found this posts: http://stackoverflow.com/q/8227233/1700321 and http://stackoverflow.com/q/1249932/1700321. – Aleksandr M Oct 22 '13 at 20:21
  • I think your setting to 'true' is OK since you did it from the beginning. 4 people is working on our repo (one Mac, one Linux, 2 Windows) and only the god knows what settings was used for all commits until today. Setting 'git config --system core.autocrlf false' helped me. – Jan Krakora Oct 22 '13 at 20:38

0 Answers0