每次 git commit 的 message(英文)的末尾是否需要英文的句号呢?

2013-08-27 04:18:57 +08:00
 Livid
其实这是我自从开始用版本控制系统就一直纠结的一个问题。
5203 次点击
所在节点    git
25 条回复
yangqi
2013-08-27 04:29:12 +08:00
这个真的不重要,跟着你的感觉走,实在不行就掷硬币
jjgod
2013-08-27 05:09:58 +08:00
message 不加,description 要加。
lightening
2013-08-27 05:41:46 +08:00
不需要。我的 commit message 不是完整的句子。(一般缺主语)
aveline
2013-08-27 06:03:32 +08:00
一般不加,看個人習慣吧。

我一般是這麼寫 Commit Message 的,不知道其他人怎麼寫。。。

thedevil5032
2013-08-27 06:23:37 +08:00
果断加,丢不掉的强迫症,哈哈。
wwqgtxx
2013-08-27 06:33:53 +08:00
从来不加
jianghu52
2013-08-27 08:27:18 +08:00
我自己用的git版本都是写中文的。
alexrezit
2013-08-27 08:35:56 +08:00
我都加了.
hustlzp
2013-08-27 08:40:04 +08:00
不加
013231
2013-08-27 08:54:18 +08:00
如果message是個完整的句子就加句號, 不是就不加.
wy315700
2013-08-27 08:57:13 +08:00
@jianghu52 中文+1 看得懂最重要
rrrrutdk
2013-08-27 09:06:01 +08:00
把Git Commit Message当成一封邮件看待,首行为标题。
raptor
2013-08-27 09:11:54 +08:00
不加
Keyes
2013-08-27 09:14:03 +08:00
<改动类型>:<详细说明>

改动类型:新功能、功能增强、BUG-FIX等
详细说明:字面意思

一句话无标点不加句号
一句话以上加句号
toctan
2013-08-27 09:17:43 +08:00
DO

- Write the summary line and description of what you have done in the imperative mode, that is as if you were commanding someone. Write “fix”, “add”, “change” instead of “fixed”, “added”, “changed”.
- Always leave the second line blank.
- Line break the commit message (to make the commit message readable without having to scroll horizontally in gitk).

DON’T

- Don’t end the summary line with a period.

https://github.com/erlang/otp/wiki/Writing-good-commit-messages
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
dalang
2013-08-27 09:22:40 +08:00
@aveline 请问截图的软件叫什么名字?
NemoAlex
2013-08-27 09:23:58 +08:00
@dalang 这个目测是用QQ截的
dalang
2013-08-27 09:27:29 +08:00
@NemoAlex
@aveline
抱歉问得有点歧义了,我是问截图里的git客户端软件叫什么名字?
toctan
2013-08-27 09:29:47 +08:00
@Keyes 更加适当的格式:

Capitalized, short (50 chars or less) summary

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.

Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
or "Fixes bug." This convention matches up with commit messages generated
by commands like git merge and git revert.

Further paragraphs come after blank lines.

- Bullet points are okay, too

- Typically a hyphen or asterisk is used for the bullet, preceded by a
single space, with blank lines in between, but conventions vary here

- Use a hanging indent

http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
NemoAlex
2013-08-27 09:29:49 +08:00
@dalang http://www.sourcetreeapp.com/
OS X 平台最棒的免费 Git/Mercurial GUI 工具

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/80328

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX