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.
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.
Paste it into your commit message.
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.
Not saying that happened in this case. Daily.
- › Why You Should Be Using ‘Movies Anywhere’
- › Why Mario Kart Just Isn’t as Fun as It Used to Be
- › How to Test Your Computer’s PSU With a PSU Tester
- › New York Will Ban Gas Car Sales, Following California’s Lead
- › 10 Alexa Features You Should Be Using on Your Amazon Echo
- › How to Batch Edit Photos and Videos on iPhone