Git commit template 模板设定
来源:互联网 发布:360wifi防蹭网软件 编辑:程序博客网 时间:2024/06/06 04:00
多人协作开发一个项目时,版本控制工具是少不了的,git是linux 内核开发时引入的一个优秀代码管理工具,利用它能很好使团队协作完成一个项目。为了规范团队的代码提交,也方便出版本时的release note,更为了出问题时方便代码回溯,所以大家统一用一个模板提交代码是必要的。Git中设置template非常简单,只需以下几步即可:
1、在根目录建立模板文件
如 xxx_template文件,其内容如下:
OverView:
BUG:
Description:
2、设置模板,命令如下
git config commit.template [模板文件名] //这个命令只能设置当前分支的提交模板
git config — —global commit.template [模板文件名] //这个命令能设置全局的提交模板,注意global前面是两杠
例如: git config commit.template xxx_template
git config --global commit.template xxx_template
3、设置文本编辑器,命令如下:
git config --global core.editor [编辑器名字]
例如:git config --global core.editor vi
4、编辑模板提交代码,命令如下
git commit
注意:a、git commit之前先要使用 git add 将没有入库的代码入库
b、可以使用 git commit -a 提交多个代码文件
5、在第四步之后,会以设置的编辑器打开模板文件,然后按照格式修改该文件,并保存
6、提交代码到远程分支
git push
- Git commit template 模板设定
- Git commit template 模板设定
- Git commit template 模板设定
- Git commit template 模板设定, GIt file name too long
- Git Commit Template 提交模板
- Git Commit Template 提交模板
- Git 提交模板 Commit Template
- 设置git commit 模板
- git commit 模板配置
- git-commit
- git-commit
- git-commit
- git commit
- git commit
- git-commit
- git# commit
- git commit
- git commit
- ORACLE 常用技巧(持续更新ing)
- 图像处理和计算机视觉中的经典论文
- 在android2.3.4samgsung 210下编译ramdisk-recovery-uboot.img实现恢复出厂设置
- Splitcontainercontrol 设置水平或垂直
- 一步步教你为网站开发Android客户端 .
- Git commit template 模板设定
- 例2-1 显示图像
- 例2-2 显示视频
- Makefile典型模板
- 例2-3 窗口添加滚动条
- 使用WebService传递自定义对象需要注意的问题
- 遍历n个元素取出等概率随机取出其中之一元素
- 例2-4 cvSmooth
- 例2-5 cvPyrDown