如何引用git提交消息中的上一次提交

在git提交消息中引用先前的提交是否有惯例?

示例提交消息:

Fixed bug such and such introduced in a1b2c3e4

特别是,github.com会有一个约定,会转换成链接吗?

Yup – GitHub将使用GitHub Flavored Markdown获取对SHA和用户/ repos模式的引用

具体关于链接到提交:

A bit of the GitHub spice

In addition to the changes in the previous section, certain references are auto-linked:

  • SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
  • User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
  • User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
  • #Num: #1
  • User/#Num: mojombo#1
  • User/Project#Num: mojombo/god#1
翻译自:http://stackoverflow.com/questions/13577311/how-to-refer-to-a-previous-commit-in-git-commit-message

转载注明原文:如何引用git提交消息中的上一次提交