You can include keywords in your commit messages to automatically close issues in GitHub.
Closing an issue in the same repository
To close an issue in the same repository, use one of the keywords in the list below followed by a reference to the issue number in the commit message. 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.
Keywords for closing issues
The following keywords will close an issue via commit message:
- close
- closes
- closed
- fix
- fixes
- fixed
- resolve
- resolves
- resolved
Closing an issue in a different repository
To close an issue in another repository, use the username/repository#issue_number
syntax, as described in "Writing on GitHub".
For example, including Closes example_user/example_repo#76
will close the referenced issue in that repository, provided you have push access to that repository.
Closing multiple issues
To close multiple issues, include multiple keywords and issue references in your commit message.
For example, This fixes #34, resolves #23, and closes example_user/example_repo#42
would close issues #34, #23, and issue #42 in the "example_user/example_repo" repository.