We've all done it---we excitedly push a commit to solve an issue, leave a useful comment like "doh!", and then forget to reference the Github issue number. Now they won't be linked together... or will they?

Luckily you can easily reference a commit in a Github issue by simply pasting in the hash which will automatically turn into a link. Most of you already know how to do that, but for everybody else, we'll detail the couple of steps.

First go find the commit in your repository. That's easy enough, just click that "X commits" link.

github click on commits

Now locate the actual commit, which you can usually find by the useful commit message you left. In our case, there's like 37 commits that all say "Doh!" so we'll just grab the last one. Click the clipboard icon to copy the hash to the clipboard.

github find hash

Paste it into your commit message.

github paste hash

And voila! The commit message magically gets turned into a link to the place where you fixed a very stupid bug that you should have caught during testing but you forgot to test and pushed it straight to production because you're the best.

github issue linked

Not saying that happened in this case. Daily.