jkcl jkcl - 3 months ago 9
Git Question

Cross-referencing commits in github

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?

Answer

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

User/Project@SHA

For example:

mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2

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

mojombo/god@be6a8cc