LoginSignup
0
0

More than 5 years have passed since last update.

[EN][TIPS] Relating issue and commits in GitHub

Last updated at Posted at 2016-10-31

Have you ever had troubles looking back at your old commits, looking for when you have made certain change?

Sometimes when we look back at commits, we face trouble that we do NOT know in which commit we made change, and which commit was related to which issue.

And when this kind of things happen, we will not be able to check diffs, or even roll-back, just because we don't know when & where the change was made.

So, to resolve that kind of problems, lets use a small tip that will eventually save your day.

Relating commits with issue

All you need to do to relate issue & commit is just write a bit on your commit message.

All you need, is just add #<issue-number> in your commit message.

For example, write commit message like this.
edit readme for "Relate issue and Commits" sample #1

By putting #1 at the end of commit message, this commit will be related with Issue or PullRequest #1.

And when you push your changes, this commit message will be shown in the Issue / PullRequest page, as shown in the image below.

スクリーンショット 2016-10-31 17.22.12_2.png

You can check the actual sample issue here
https://github.com/table-cloth/Sandbox/issues/1

And now we are done!
Have a nice day :laughing:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0