Git cherry pick and merge, ignoring EOL changes

Recently, in all our repositories, we have added the git attribute file to all our repositories. The idea was to force the use of Unix EoL characters in all files. This created huge problems on the first day when you check out a new branch, it starts showing changes in the whole file. We just did it.

Now the problem is that we merge from one branch to another (which we do quite often) or cherry picks (we do more). Merge shows conflicts again in all files.

It would be ideal if git could ignore line endings or changing whitespace in preferences. Does anyone know if git contains something like this or if there is a workaround?

+5
source share
1 answer

Take a look at git merge strategies . those. you can specify to use ignore-space-at-eol- which can help you in this case. Alternatively, you can try using oursto force your EOL changes to be accepted.

+2
source

All Articles