git 上传到 代码库里面想说明情况
方式1
文件夹中右击键盘

设置

设置模块

[commit]
template = E:/xxxx/commit_template
commit_template的内容
【解决问题】:[zs][APP][对应bug号]modify a ....
【测试注意】:可能带出来的一些问题或者做一些特殊的补充或者说明
【对应bug】:
【操作类型】:修改或者新功能添加
【重要程度】一般or重要or非常重要
【影响产品】影响产品
这样就自动添加上了

方式二
关于git 提交模板的配置
1.在根目录建立模板文件,(文件名可以自己定义,这里叫testtemplate)内容如下:(此文件内容可以根据自己公司的要求自行定义)
【解决问题】:[zs][APP][对应bug号]modify a ....
【测试注意】可能带出来的一些问题或者做一些特殊的补充或者说明
【对应bug】93478 ...
【操作类型】修改或者新功能添加
【重要程度】一般or重要or非常重要
【影响产品】影响产品
2.设置模板命令如下(文件名为上面步骤的,是testtemplate)
git config commit.template [模板文件名] //这个命令只能设置当前分支的提交模板
git config --global commit.template [模板文件名] //这个命令能设置全局的提交模板,注意global前面是两杠
例如:git config --global commit.template testtemplate
3.设置文本编辑器。
git config --global core.editor [编辑器名字]
例如:git config --global core.editor vim
4.设置完毕,以后提交代码时,git add 然后git commit 之后模板就会出现。直接可以编辑message。
网友评论