Search code examples
gitgithubcommitgithub-flavored-markdown

Github Commit Syntax to Link a Pull Request/ Issue


I've seen commit messages that refer to a specific issue / pull request. What is the syntax to include a specific repository's issue or pull request?


Solution

  • Use the documented auto-linking format for issues across repositories.

    • Syntax: {owner}/{repository}#{issue_number}
    • Example: mojombo/jekyll#1

    When such formatted text is present in a commit message, it's automatically transformed into a clickable link which will redirect one to https://github.com/{owner}/{repository}/issues/{issue_number}