问题
How do I craft customized commit message template?
I would like to have something like:
# Short (50 chars or fewer) summary of changes
# More detailed explanatory text
回答1:
Add following to your ~/.gitconfig
:
[commit]
template = ~/.git-commit-message
Create ~/.git-commit-message
file with following content:
# Short (50 chars or fewer) summary of changes
# More detailed explanatory text
Ref. commit.template in http://git-scm.com/docs/git-config
来源:https://stackoverflow.com/questions/31873577/custom-git-commit-message-template