如果我想创建自定义 git commit 模板,我可以将模板路径添加为:
[commit]
template = ~/.gitmessage
但它一直附加在我的提交模板默认模板的底部:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: lib/test.rb
#
阅读 configuration他们还附加了默认模板。我知道它已被注释掉,但无论如何要删除它以便它只显示我的自定义模板?
最佳答案
将commit.status
设置为false
。
git config commit.status false
或
git -c commit.status=false commit
关于git - 如何删除 git commit 默认模板消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55967993/