写得好 git 提交信息
编写好 git 提交信息
提交信息
我们作出答复,更改将提交相关信息,这些信息通常被认为是重要的信息会小心留下应该离开,你为什么需要这个提交实例,提交解决任何问题。
我们需要良好的信息组织,虽然后来,由于这些跟代码一样重要。他们是历史,就像课本一样,一旦留下错误的信息或者难以理解的信息。将会对
后来者,产生许多的麻烦。
提交信息规范
一般来说,提交信息没有什么强制性的规范,可是希望大家遵循一些主要的规则,这些规则有利于大家正确表达提交内容,留下重要的信息。而忽略那些不必要
的内容。
实例
https://github.com/torvalds/subsurface
编写一个良好的提交信息:
| Also, please write good git commit messages. A good commit message |
| looks like this: |
| Header line: explain the commit in one line (use the imperative) |
| Body of commit message is a few lines of text, explaining things |
| in more detail, possibly giving some background about the issue |
| being fixed, etc etc. |
| The body of the commit message can be several paragraphs, and |
| please do proper word-wrap and keep columns shorter than about |
| 74 characters or so. That way "git log" will show things |
| nicely even when it's indented. |
| Make sure you explain your solution and why you're doing what you're |
| doing, as opposed to describing what you're doing. Reviewers and your |
| future self can read the patch, but might not understand why a |
| particular solution was implemented. |
| Reported-by: whoever-reported-it |
| Signed-off-by: Your Name <youremail@yourhost.com> |
| where that header line really should be meaningful, and really should be |
| just one line. That header line is what is shown by tools like gitk and |
| shortlog, and should summarize the change in one readable line of text, |
| independently of the longer explanation. Please use verbs in the |
| imperative in the commit message, as in "Fix bug that...", "Add |
| file/feature ...", or "Make Subsurface..." |
一次良好的提交信息应该包括一个信息头,尽量用一行文字总结那些必要信息
然后空下一行。
接着写下关于这次提交的详细内容。有关修复bug的背景等等,尽量表达你为什么
要做这次提交而不是你正在作什么提交。这样被人才干非常好的理解而不会弄不清楚
为什么须要这个东西。
全部的提交内容保持在74个字符之内,这样才干被 git log
正常的显示。而不会超过屏幕。
以下是一些: 提交者信息,或者其它信息,一般都是 git 里面须要的代码编写者或者
測试者名字和邮箱。详细參考 git 。
版权声明:本文博客原创文章。博客,未经同意,不得转载。
写得好 git 提交信息的更多相关文章
- 怎么创建一个良好的Git提交信息
译 原文:https://dev.to/chrissiemhrk/git-commit-message-5e21 提交信息是对提交之前添加和更改的文件所做的更改的简短描述. 良好的提交信息不仅对你 ...
- git push撤销、git commit 撤销、git add撤销、修改git提交信息
原文地址:http://leisure.wang/?p=472 虽然自觉是一个Git工具的老手了,但是平时犯了一点错误,就发现有点捉襟见肘了.就好像今天我把一些代码玩坏了,想撤回到前几个版本去(此时已 ...
- commit lint规范化团队git提交信息
一.快速提交符号angular编码规范的提交信息 1.命令行中安装commitizen: npm install -g commitizen commitizen init cz-convention ...
- 在 Git 提交信息中使用 Emoji
Gitmoji 旨在解释如何在 Git 提交消息时使用表情符号.在提交信息时使用表情符号,可以更容易地识别提交的目的或意图. Emoji 列表 :优化项目结构 / 代码格式 :art: ️ :性能提升 ...
- 使用gradle构建Android时 版本号versionName中嵌入git提交信息
为什么要这么做 在应用开发的版本迭代过程中,通过版本号并不能快速定位到所对应的代码,导致在后面分析问题追溯对应版本的代码时比较麻烦. 如果代码是通过git来管理的,git的commit id等 ...
- [Golang] 编译程序时打上git提交信息标记
1.加入代码 //version.go package version import ( "flag" "fmt" "os" ) var ( ...
- 老鸟都应该注意的git 提交规范
不知道大家有没有看过自己项目的git 提交信息-----我看过好多次 ,不忍直视 然后提醒一起的小伙伴 :大家规范点 信息要详细, 过段时间再看下 ,还是一样. 相信很多猿都有这样的感受,对于垃圾的 ...
- git: hook 修改提交信息
git获取数字顺序版本号 因为git的版本使用的是hash值,不能很直观的看出那个版本,所以想找到一种方法,获取顺序的版本号,在网上找到了方法,可以获取顺序版本号 摘自:[使用bash从SVN和Git ...
- 使用git命令修改commit提交信息
很多时候我们在提交代码时可能会把commit提交信息写错了,这个时候我们就可以用到下面的git命令来修改commit提交信息 git commit --amend 输入"i"之后进 ...
随机推荐
- decorate pattern 装饰模式
[装饰模式的优缺点]装饰模式的优点:1.比静态继承更灵活:2.避免在层次结构高层的类有太多的特征装饰模式的缺点:1.使用装饰模式会产生比使用继承关系更多的对象.并且这些对象看上去都很想像,从而使得查错 ...
- Blend4精选案例图解教程(三):一键拖拽
原文:Blend4精选案例图解教程(三):一键拖拽 拖拽效果,常规实现方法是定义MoveLeftDwon.MoveLeftUp.MouseMove事件,在Blend的世界里,实现对象的拖拽,可以不写一 ...
- LoaderManager使用具体解释(二)---了解LoaderManager
了解LoaderManager 这篇文章将介绍LoaderManager类,这是该系列的第二篇文章. 一:Loaders之前世界 二:了解LoaderManager 三:实现Loaders 四:实例: ...
- 採訪The Molasses Flood:BioShock Infinite 游戏之后又一大作
Xsolla有幸与Flame in the Flood游戏的开发人员之中的一个-----Forrest Dowling进行了採訪,Flame in the Flood这款非常棒的游戏在Kickstar ...
- [ Talk is Cheap Show me the CODE ] : jQuery Mobile工具栏
[ Talk is Cheap Show me the CODE ] : jQuery Mobile工具栏 Written In The Font " Wirte less Do more& ...
- hdu1325 Is It A Tree?并检查集合
pid=1325">职务地址 试想一下,在词和话题hdu1272是一样的. 可是hdu1272的博文中我也说了.数据比較水,所以我用非并查集的方法就AC了. 可是这题的数据没那么水,要 ...
- TI C66x DSP 系统events及其应用 - 5.8(ISTP)
中断服务表指针ISTP(Interrupt Service Table Pointer)位置寄存器用于定位的中断服务例程,那ISTP去哪里找要运行的程序,ISTP(当中的ISTB字段)就是指向IST表 ...
- Codeforces 12D Ball 树形阵列模拟3排序元素
主题链接:点击打开链接 #include<stdio.h> #include<iostream> #include<string.h> #include<se ...
- jQuery 有条件排序
尊重劳动成果,转载请注明出处(http://blog.csdn.net/sllailcp/article/details/41011173)... 点击button,表格里就会依照分数的高低.将学生信 ...
- c++日历v1.0版本
#include<iostream> # include<fstream> #include<time.h> #include<string> #inc ...