Link to the issue number on GitHub within a commit message
是否有可能在git commit
消息中自动链接到GitHub问题编号?
Just include #xxx
in your commit message to reference an issue without closing it.
With new GitHub issues 2.0 you can use these synonyms to reference an issue and close it (in your commit message):
fix #xxx
fixes #xxx
fixed #xxx
close #xxx
closes #xxx
closed #xxx
resolve #xxx
resolves #xxx
resolved #xxx
You can also substitute #xxx
with gh-xxx
.
Referencing and closing issues across repos also works:
fixes user/repo#xxx
Check out the documentation available in their Help section.
If you want to link to a GitHub issue and close the issue, you can provide the following lines in your Git commit message:
Closes #1.
Closes GH-1.
Closes gh-1.
(Any of the three will work.) Note that this will link to the issue and also close it. You can find out more in this blog post (start watching the embedded video at about 1:40).
I'm not sure if a similar syntax will simply link to an issue without closing it.
You can also cross reference repos:
githubuser/repository#xxx
xxx being the issue number
链接地址: http://www.djcxy.com/p/23172.html