git github 中的交叉引用提交

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8376475/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 12:25:47  来源:igfitidea点击:

Cross-referencing commits in github

gitgithub

提问by jkcl

I'd like to reference commits in other repos (in this case submodules) in the github issues of my main repo. Is it possible to do so without typing the full hyperlink in a way similar to how github creates a shortened hyperlink from the commit number?

我想在我的主存储库的 github 问题中引用其他存储库(在本例中为子模块)中的提交。是否可以在不输入完整超链接的情况下这样做,类似于 github 如何从提交编号创建缩短的超链接?

回答by Martin Vilcans

The answer, so us lazy people can find it without following the link to the Autolinked References and URLs section of the GitHub help:

答案,所以我们懒惰的人可以找到它,而无需点击GitHub 帮助Autolinked References and URLs 部分链接

User/Project@SHA

For example:

例如:

mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2

Short SHAs work as well (as long as they are unique):

短 SHA 也适用(只要它们是唯一的):

mojombo/god@be6a8cc