1

I've recently forked a repository. I made a local repository and created a maven project through eclipse. I made the changes I wanted and commited them. Although I made minor changes the differences shown on Github are tremendous. All the file is shown as having been changed. I believe that this is an encoding misalignment. In my eclipse workspace I didn't change anything when I created the project so the default was Cp1253 (Windows 7).

I want to make a pull request for the changes I made, but I want to fix this diff problem before I do that. I don't know what encoding was used in the original project. What are my options?

Alkis Kalogeris
  • 17,044
  • 15
  • 59
  • 113

1 Answers1

1

Check your .gitconfig file in your home directory. Do you have the following setting?

[core]
    autocrlf = input
xeraa
  • 10,456
  • 3
  • 33
  • 66
  • If you mean the config file inside the .git folder, then no. I added that, but still... how will the diffs from past commits will be fixed? More importantly, can they be fixed, or should I just recreate the repository, add this option and see what happens? – Alkis Kalogeris Aug 17 '14 at 20:32
  • You can add this on a per project basis, but there should be a global one at ``~/.gitconfig``. But the one in the project overrides the global one. What happens if you do a fresh clone? Do you have any changes right from the beginning? And are you already using Git 2? – xeraa Aug 17 '14 at 20:52
  • Just clone the same repository in a new location and see, if it already has any changes – xeraa Aug 18 '14 at 10:00