Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross-referencing commits in github

Tags:

git

github

People also ask

How do I reference a commit in GitHub?

To reference a commit, simply write its SHA-hash, and it'll automatically get turned into a link.

How do I reference another issue in GitHub?

You can reference issues between repositories by mentioning user/repository#number in an issue. Once we see something like that — say, github/enterprise#59 — we'll make sure to update issue #59 in github's enterprise repository and let you know where it was referenced from.

How do you reference an issue in a commit?

You just need to include #xxx in your commit message to reference an issue without closing it. With the new GitHub issues 2.0, you can use these synonyms to reference an issue and close it (in your commit message).


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