How can I reference a commit in an issue comment on GitHub?

535

I find a lot of answers on how to reference a GitHub issue in a git commit (using the #xxx notation). I'd like to reference a commit in my comment, generating a link to the commit details page?

This question is tagged with github commit issue-tracking

~ Asked on 2012-01-18 12:43:01

The Best Answer is


646

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

See also:

~ Answered on 2012-01-18 12:47:50


114

Answer above is missing an example which might not be obvious (it wasn't to me).

Url could be broken down into parts

https://github.com/liufa/Tuplinator/commit/f36e3c5b3aba23a6c9cf7c01e7485028a23c3811
                  \_____/\________/       \_______________________________________/
                   |        |                              |
            Account name    |                      Hash of revision
                        Project name              

Hash can be found here (you can click it and will get the url from browser).

enter image description here

Hope this saves you some time.

~ Answered on 2016-02-09 16:32:52


Most Viewed Questions: