Github – Connect an issue with a commit after the commit

github

I did a git commit and pushed to github, but forgot to mention the issue number in the commit (I forgot to write something like ... closes #123).

If I had mentioned the issue number in the commit message, github would have connected the commit to the issue. Is there any way to do this after the commit, when it's too late for me to change the commit message?

EDIT: Assume that it's too late to amend the commit or otherwise alter the history. I am really asking about github functionality, not git.

Best Answer

In your issue on GitHub, just write a comment with the commit hash. For instance:

Fixed with commit 61d949320fc0bf1a8dba09b3845bddcd153b1a64

GitHub will recognize it as a SHA and link to the right commit page.