5

Recently in all of our repos, we added a git attribute file to all our repos. The idea was to force use the Unix EoL chars in all files. This created huge issues first day when you checkout to a new branch, it starts to show changes in the entire file. We simply committed it.

Now, the issue is if we merge from one branch to another (which we do quite often) or cherry-pick (we do more of it) the merge shows conflicts once again in all the files.

It would be ideal if git could ignore line endings or white space changes through a preference. Does anyone know if git contains something like this or if there is a workaround?

openSource
  • 191
  • 2
  • 6
  • All the cherry picks between branches that have different line endings are not showing full file changes, although I am interested in only the cherry-pick to come to the new branch. If anyone knows a solution, it'll be appreciated. I am sure this is not a recurring problem for anyone but once in a while. – openSource Aug 02 '12 at 05:17

1 Answers1

2

Take a look at the git merge strategies. ie you can specify to use the ignore-space-at-eol - which might help you in this case. Alternatively you can try using ours to force your EOL changes to be taken.

Máté
  • 2,294
  • 3
  • 18
  • 25