如下步骤:
1.创建xxx_template文件,其内容为团队制定的Git提交注释规范,如:
Desgraption:
Date:
Author:
2.通过git config命令配置commit_template,如:
git config –global commit.template /d/develop/Git/Git_Home/commit_template
3.设置git commit时填写注释所用的编辑器,如:
git config –global core.editor vi
OK,设置完成,提交使用git commit会出现与下图相似的界面填写好注释才能提交成功: