Closing issues using keywords

You can include keywords in your pull request descriptions, as well as commit messages, to automatically close issues in GitHub.

When a pull request or commit references a keyword and issue number, it creates an association between the pull request and the issue. When the pull request is merged into your repository's default branch, the corresponding issue is automatically closed.

The following keywords, followed by an issue number, will close the issue:

close

closes

closed

fix

fixes

fixed

resolve

resolves

resolved

For example, to close an issue numbered 123, you could use the phrase "Closes #123" or "Closes: #123" in your pull request description or commit message. Once the branch is merged into the default branch, the issue will close.

To close an issue in the same repository, use one of the keywords above followed by a reference to the issue number. For example, a commit message with Fixes #45 will close issue 45 in that repository once the commit is merged into the default branch.

If the commit is in a non-default branch, the issue will remain open and the issue will be referenced with a tooltip.