有没有一种类似于提交信息模板的方法来设置git tag
消息模板?
使用git config
,我们可以为提交配置一个模板,指向某些.git-msg-template
。例如,在~/.gitconfig
中,它会像这样:
[commit]
template = ~/.git-msg-template
然而,如果你阅读git文档或在终端中查找git config tag.*
选项,似乎没有git config tag.template
,只有git config commit.template
设置。
尽管如此,即使不设置自定义的commit.template
,对我来说,提交和标签的默认消息也是不同的。提交以Please enter the commit message ...
开头,并添加分支信息等等,而标签只需Write a message for tag: v1.0.0
。因此,在内部,提交和标签应该有不同的模板?!