如何让git merge的默认设置为--no-ff --no-commit? [英] How do I make git merge's default be --no-ff --no-commit?
问题描述
- no-ff
。我个人喜欢调整合并日志消息,所以我使用 - no-commit
。另外我喜欢在我让提交进行之前进行实际编译和测试。 如何制作 - no-ff
和 - no-commit
所有分支的默认值?
在提出这些问题之后的几年中,我几乎总是对提交感到满意,所以默认情况下允许它提交更简单,只要我在修改或以其他方式解决问题之前进行推送就可以了。)
把这个放在$ HOME / .gitconfig中:
[merge]
ff = no
commit = no
你可以使用git-config来做到这一点:
git config --global merge.commit no
git config --global merge.ff no
Company policy is to use --no-ff
for merge commits. I personally like to adjust merge log messages so I use --no-commit
. Plus I like to actually compile and test before I let the commit go.
How do I make --no-ff
and --no-commit
the default for me for all branches?
(and I've learned in the years since asking this, I almost always am happy with the commit, so it is simpler to allow it to commit by default and so long as I amend or otherwise fix things up before doing a push things are all good...)
Put this in $HOME/.gitconfig:
[merge]
ff = no
commit = no
You can use git-config to do this:
git config --global merge.commit no
git config --global merge.ff no
这篇关于如何让git merge的默认设置为--no-ff --no-commit?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!