How do I reference a specific issue comment on github?

You can click on the date in the header of the comment to get a URL to the comment

enter image description here

For example, for issue https://github.com/centic9/jgit-cookbook/issues/5 one of the comments has the following link: https://github.com/centic9/jgit-cookbook/issues/5#issuecomment-51084491.


Since August 2018, there is a more intuitive (and likely more reliable) way.
See "Copy the URL of a comment":

Previously, in order to grab a permalink to a comment within an issue or pull request, you’d need to copy the URL from a comment’s timestamp.

Now you can click Copy URL within the comment’s options menu to quickly copy the URL to your clipboard.

Copy comment URL.

This works on commits in a Pull Request too:
https://github.com/moby/moby/pull/37558#discussion_r211356672 refers to:

Copy on PR comment


And since February 2019, that works on mobile too!

Issue and pull request comment permalinks can now be copied on mobile devices, via the comment action menu.


Simple method:

Every comment in github has header like below

[Commenter Name] commented on [x days ago]

Right click the date information i.e. [x days ago] and copy the link

Tags:

Github