githubcommitissue-tracking

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


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


Solution

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

    the commit 3e5c1e60269ae0329094de131227285d4682b665 solved the issue...
    

    Or use its prefix

    the commit 3e5c1e6 solved the issue...
    

    See also: