Link Git Commit to Github Issues

Shen Lu
Shen Lu
Posted on Jul 28, 2023
views
1 min read (133 words)

A few days ago, a peer raised an issue on my GitHub repository, shenlu89.github.io, regarding the design of the code blocks.

To close the issue using Conventional Commits, I used the "close" keyword in your commit message. Here's how you can do it:

fix: code block hard to read close #3

After making the desired changes to your commit message, push the commit to your GitHub repository. GitHub will automatically recognize the reference in the commit message and link the commit to issue #3

By the way, You can use any of these keywords to close an issue via commit message:

  • fix #xxx
  • fixes #xxx
  • fixed #xxx
  • close #xxx
  • closes #xxx
  • closed #xxx
  • resolve #xxx
  • resolves #xxx
  • resolved #xxx