Link a GitHub Commit to an Issue

An important productivity tip for software teams is to link your development tools together whenever possible. Your tools become more powerful when working together, and being able to jump instantly between tools helps developers maintain concentration.

An easy yet powerful example is to link your Git commit messages to any relevant bugs or tickets. There are a couple of ways to do this, depending on whether you use GitHub Issues, or some other project management tool (for example Jira, Kitemaker, or Trello).

Photo by Marcus Winkler on Pexels
Hero image of plug
Connect your development tools and increase productivity

If you use the correct format in your commit message, your commit will be automatically linked to a GitHub Issue or Pull Request. To do this, put a # followed the Issue or Pull Request number. This will automatically create a link in the commit message.

For example if you made a commit to the microsoft/vscode repo and wrote the folllowing commit message:

Fix bug #1337
this gets automatically converted to:
Fix bug #1337
Notice how the link points to ? Nice :)

You can also use the prefix GH-. This means the following commit message:

Fix bug GH-1337
gets automatically converted to:
Fix bug GH-1337

It is also possible to link to Issues in other GitHub repos. The details are on the GitHub website.

GitDailies supports all these possible formats, and automatically links GitHub Commits to Issues or Pull Requests.

If you use a project management tool like Jira, Kitemaker, or Trello, a really powerful productivity boost is to link from commit messages to issues or tickets in those tools.

Using GitHub

If you have GitHub Pro, Team, or Enterprise, you can configure autolinks within GitHub. There is more information on the GitHub website.

Using GitDailies

If you use GitDailies to stay up to date with your team’s daily GitHub work, there’s good news! You can configure GitDailies to automatically link from commits to any external tool. Here’s a guide on how to do it.

  1. To start, go to the Settings page for the Daily you want to set up autolinks for:
    Choose Daily settings
  2. Next, click “Add autolink” in the “Autolink references” panel:
    Autolink settings panel
  3. Choose a prefix for the autolink. Whenever GitDailies sees a commit message containing this prefix followed a number (e.g. ABC-23), it will create a link:
    Choose autolink prefix
  4. Choose a target for the autolink. The format of the link depends on which tool you are linking to e.g. for JIRA it might be<num>
    Choose autolink target
  5. You will see an example mapping for your new autolink:
    Example mapping for new autolink
  6. Click “Add”. You now have autolinks in commit messages for this Daily!

Get GitDailies!

Keep your team aligned and motivated.

  • Visualize your team's daily changes
  • Installs seamlessly as a GitHub app
  • Autolink from commit messages to your tools
  • Peer recognition system
  • Slack integration
  • Create custom badges / awards
  • Customize the Visualizer with your logo and brand colors
  • Free 14 Day Trial - No card needed