Git commit template 模板设定
来源:互联网 发布:identifier c语言 编辑:程序博客网 时间:2024/06/05 13:21
多人协作开发一个项目时,版本控制工具是少不了的,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
原文地址:http://www.open-open.com/lib/view/open1342278820463.html
- 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
- Intent Flag介绍
- ANDROID内存优化(大汇总——全)
- 常用的Linux命令
- spring 注释
- iOS中Block介绍(一)基础
- Git commit template 模板设定
- C#总结
- 关于YII中JSON的操作
- [2.x]cocos2d-x的消息和数据传递
- druid配置
- 经典排序算法 - 快速排序Quick sort
- python 装饰器例子
- Linux C 多线程编程 总结
- LNMP环境搭建