Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git merge: filter files to avoid silly conflicts (like whitespace or case changes)

I'm currently inside a very complicated merge in git, and I have many conflicts. The conflict is about two Ada source files.

I would like to make a merge that would ignore both whitespace changes and case changes (as the Ada language is case insensitive). Do you know if there is a way to tell git to ignore some kind of changes before a merge ?

My solution is currently to run the GNAT pretty print on both branches before the merge, but if there was a common solution included in git, that would help me a lot.

like image 993
Mildred Avatar asked Feb 01 '11 10:02

Mildred


1 Answers

from the release notes of git 1.7.4:

* The "recursive" strategy also learned to ignore various whitespace changes; the most notable is -Xignore-space-at-eol.

I don't know if there is a strategy to ignore case changes though

like image 89
knittl Avatar answered Dec 09 '22 02:12

knittl