git Github 提交消息链接
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3832227/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Github commit message links
提问by Mikulas Dite
Is it possible to create a commit message with link to other repository commit?
是否可以创建带有其他存储库提交链接的提交消息?
Eg. something like [Username\Repo\commitHash]
例如。就像是[Username\Repo\commitHash]
Usage example: if some bc break would happen in some framework's commit, I'd like to link to this very commit in my own commits updating my code which uses this framework.
用法示例:如果某些框架的提交中会发生某些 bc 中断,我想在我自己的提交中链接到此提交,更新使用此框架的代码。
回答by antitoxic
I was searching for something like this myself. Found it on:
我自己也在寻找这样的东西。找到它:
https://help.github.com/articles/autolinked-references-and-urls/#commit-shas
https://help.github.com/articles/autolinked-references-and-urls/#commit-shas
<<username>>/<<repo>>@<<commitHash>>
Without the angle brackets of course :)
当然没有尖括号:)
回答by sleepynate
I don't think there's anything stopping you from putting something like:
我认为没有什么可以阻止您输入以下内容:
http://github.com/pkrumins/lulzbot/commit/4c1b1ea95b379805e3b595b511a89affc6811145
http://github.com/pkrumins/lulzbot/commit/4c1b1ea95b379805e3b595b511a89affc6811145
Right in your commit message. While this doesn't link directly to the git object's version of the commit... it leads to a page showing that commit.
就在您的提交消息中。虽然这不会直接链接到 git 对象的提交版本......但它会导致一个页面显示该提交。
Format is github.com/User/Repo/commit/hashtag
格式为 github.com/User/Repo/commit/hashtag