首页 > 在github commit message 中输入类似 fix #1 (fixed#1,fixes#2 ...)的语句有什么区别?

在github commit message 中输入类似 fix #1 (fixed#1,fixes#2 ...)的语句有什么区别?

之前一直好奇这些语句之间的区别,今天google了一下,找到以下两篇文章。

第一篇: github blog 在文章最后有这么一段:

Didn't know about this feature? You can use any of these keywords to close an issue via commit message:

close, closes, closed, fixes, fixed All of them work the same, including this behavior.

第二篇: github help在文章的第二段有以下解释:

When you enter "Fixes #45" into a commit message, issue #45 is closed once that commit is merged into your default branch. If the bug isn't fixed to your default branch, the issue remains open. Once the commit with the fix is merged into your default branch, the issue is automatically closed.

有没有哪位大牛可以详细说一下区别?如果没有区别,这样设置的原因是什么?


这几种写法都是可以的, 效果一样 都是合并到默认分支之后自动关闭该issue

【热门文章】
【热门文章】