Footer with Issue References
Learn how to add footers to commit messages for issue references, co-authors, and other metadata. Covers Closes, Fixes, Refs keywords and multi-footer usage.
Detailed Explanation
Commit Message Footers
Footers appear after the body (separated by a blank line) and contain metadata about the commit. The most common use is referencing issues, but footers can also include co-authors, sign-offs, and other structured data.
Issue Reference Keywords
Git hosting platforms recognize these keywords in footers:
| Keyword | Effect |
|---|---|
Closes #123 |
Closes the issue when merged |
Fixes #123 |
Same as Closes |
Resolves #123 |
Same as Closes |
Refs #123 |
Links to issue without closing |
Related #123 |
Informal reference |
Example with Footer
fix(auth): prevent session fixation attack
Regenerate session ID after successful login to
prevent session fixation. Previously, the session
ID remained the same before and after authentication,
allowing an attacker to set a known session ID.
Closes #445
Refs #312
Multiple Footers
You can include multiple footers, each on its own line:
feat(api): add batch processing endpoint
Implement /api/batch for processing up to 100
requests in a single HTTP call. Responses are
returned in the same order as requests.
Closes #890
Closes #891
Refs #850
Co-authored-by: Jane Smith <jane@example.com>
Cross-Repository References
For referencing issues in other repositories:
Closes org/other-repo#234
BREAKING CHANGE as Footer
The BREAKING CHANGE: footer is a special case:
feat!: drop IE11 support
Remove all IE11-specific polyfills and CSS hacks.
This reduces the bundle size by 15KB.
BREAKING CHANGE: Internet Explorer 11 is no longer
supported. Users must upgrade to a modern browser.
Closes #1024
Signed-off-by and Trailers
Some projects require sign-off for legal compliance:
docs: update privacy policy for GDPR compliance
Signed-off-by: Developer Name <dev@example.com>
Reviewed-by: Legal Team <legal@example.com>
Use Case
You have fixed a security vulnerability that was reported in your issue tracker and is also related to a broader security audit issue. You need a commit message that closes the specific bug report, references the audit issue, and credits the security researcher who reported it.