Merge strategy for whitespace only changes?

半城伤御伤魂 提交于 2019-12-24 01:20:00

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!