We've all done it: We're eagerly striving for a commit to fix a problem, leaving a useful comment like "doh!" And then forget to refer to the Github number. Now they are no longer linked together … are they?
Fortunately, you can easily reference a commit in a Github issue by simply pasting the hash that automatically turns into a link. Most of you already know how to do that, but for everyone else we will describe the steps.
First find the commit in your repository. That's easy enough, just click on the link & # 39; X commits & # 39 ;.
Now locate the actual commit, which you can usually find from the useful commit message you left. In our case, there are about 37 commits that all say "Doh!" so we just take 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 turns into a link to the place where you fixed a very stupid bug that you should have caught while testing, but forgot to test and pushed it directly to production because you are the best.
Don't say this happened in this case. Daily.
Source link