I did a code format in master branch. It mainly fixed whitespace issues like: formatting tab space lengths, adds and removes newlines before and after braces. The problem is, when I try to merge master from other branches I get a lot of conflicts. Is there some strategy to bring in whitespace changes to other branches?
Asked
Active
Viewed 489 times
1 Answers
1
From the docs of git merge
, I would assume that
git merge -s recursive -Xignore-space-change
could be used to achieve this. You might also want to play around with
-Xignore-all-space
or-Xignore-space-at-eol

eckes
- 64,417
- 29
- 168
- 201
-
This helped a lot. However, conflicts still ocurred. It was much easier to resolve them when I did code format in both branches first and then merged them with the above method. – Dziamid Feb 13 '12 at 15:55
-
For those who are wondering why this solution doesn't work, it was not introduced until 1.7.4 https://raw.github.com/gitster/git/master/Documentation/RelNotes/1.7.4.txt – Rob Mar 05 '12 at 10:24