# revert: Reverts a previous commit 可以将上述模板信息保存在文件"~/.gitmessage "中并添加为git的commit模板: 修改~/.gitconfig,添加: [commit] template = ~/.gitmessage
subject 是 commit 目的的简短描述,不超过50个字符。 Message body Message body 部分是对本次 commit 的详细描述,可以分成多行。下面是一个范例。 More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. Further paragraphs come after blank lines. - Bullet points are okay, ...
代码历史的可读性:清晰的commit message 能帮助开发者快速理解项目的演变历史,尤其是在回顾代码变更或追踪问题时,良好的commit message 能极大提高效率。 团队协作:在团队开发中,其他成员可能会查看你的commit message 以理解你所做的更改。如果commit message 模糊不清或没有足够的信息,可能会导致沟通问题甚至代码冲突。
You can use multiple-mflags to create "multiline commits", and I have to admit that this can be very handy in some cases. Edited: Several people pointed out that you can achieve the same commit structure including a title and body (multiple lines) by opening quotes, pressing ...
subject 是 commit 目的的简短描述,不超过50个字符。 Message body Message body 部分是对本次 commit 的详细描述,可以分成多行。下面是一个范例。 More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. Further paragraphs come after blank lines. ...
# body:72-character wrapped.Multiple lines separated by “-”,This should answer:#*Why wasthischange necessary?#*How does it address the problem?#*Are there any side effects?# # footer:#-Include a link to the ticket,ifany.#-BREAKINGCHANGE# ...
Git 每次提交代码,都要写 Commit message(提交说明),否则就不允许提交。 $ git commit -m "hello world" 上面代码的-m参数,就是用来指定 commit mesage 的。 如果一行不够,可以只执行git commit,就会跳出文本编辑器,让你写多行。 $ git commit 基本上,你写什么都行(这里,这里和这里)。 但是,一般来说,co...
Multiple lines can be added to an option by using the --append option. If you want to update or unset an option which can occur on multiple lines, a value-pattern (which is an extended regular expression, unless the --fixed-value option is given) needs to be given. Only the existing...
# . message (or the oneline, if no original merge commit was # . specified). Use -c <commit> to reword the commit message. # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. ...
Show no parents before all of its children are shown, and avoid showing commits on multiple lines of history intermixed. For example, in a commit history like this: ---1---2---4---7 \ \ 3---5---6---8--- where the numbers denote the order of commit timestamps, git rev-li...