git merge-默认情况下更改Xignore空间
如何使用git merge-默认情况下更改Xignore空间,git,merge,git-merge,git-config,Git,Merge,Git Merge,Git Config,如何使用git config为所有合并设置选项ignore space change 我也许可以在merge上使用别名,但由于我希望将该设置应用于git stash pop、git stash apply、git pull和git merge,以及其他一些别名(如果有的话),因此我希望使用一种比设置许多别名更干净的方法(我甚至不知道是否可以为子命令设置别名stash) 我查看了文档,但找不到要使用的配置选项。每个分支: git config branch.$branchname.mergeopt
git config
为所有合并设置选项ignore space change
我也许可以在merge
上使用别名,但由于我希望将该设置应用于git stash pop
、git stash apply
、git pull
和git merge
,以及其他一些别名(如果有的话),因此我希望使用一种比设置许多别名更干净的方法(我甚至不知道是否可以为子命令设置别名stash
)
我查看了文档,但找不到要使用的配置选项。每个分支:
git config branch.$branchname.mergeoptions "-X ignore-space-change"
通过扫描“合并”找到。如果有全局选项设置器,我看不到,git别名可能会这样做:
git config alias.i-s-c-merge "merge -X ignore-space-change"
我认为现在每个shell在git命令上都有tab完成,所以它是
git I-
和tabkey,而不是空格键。可能是@ThomasRuiz的副本这肯定是相关的,但这个问题只是关于git diff
,而不是git merge
(可能git merge
在内部依赖于git diff
)这会影响哪个分支?如果我在master
上设置了mergeoptions,并且想要将new\u功能
合并到其中,我需要在master
上、在new\u功能
上或两者上设置吗?