问题
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?
回答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
来源:https://stackoverflow.com/questions/9260524/merge-strategy-for-whitespace-only-changes