-
-
Save MaxwellBo/440f26970207a0fd6e69 to your computer and use it in GitHub Desktop.
A Git commit template to make it easy to enforce a good and uniform commit message style across teams.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# |<--- ^ <emoji>? <type>: <subject> ^ --->| | |
# |<--- v Explain why this change is being made v --->| | |
# |<--- v Provide links to tickets, issues or other resources v --->| | |
# --- COMMIT END --- | |
# Type can be | |
# feat (new feature) | |
# fix (bug fix) | |
# refactor (refactoring production code) | |
# style (formatting, missing semi colons, etc; no code change) | |
# docs (changes to documentation) | |
# test (adding missing tests, refactoring tests; no production code change) | |
# chore (updating grunt tasks etc; no production code change) | |
# -------------------- | |
# Remember to | |
# Capitalize the subject line | |
# Use the imperative mood in the subject line | |
# Do not end the subject line with a period | |
# Separate subject from body with a blank line | |
# Use the body to explain what and why vs. how | |
# Can use multiple lines with "-" for bullet points in body | |
# -------------------- | |
# Emoji can be | |
# :new: when adding a feature | |
# :bug: when fixing a bug | |
# :apple: when fixing something on Mac OS | |
# :penguin: when fixing something on Linux | |
# :checkered_flag: when fixing something on Windows | |
# :lock: when dealing with security | |
# :racehorse: when improving performance | |
# :non-potable_water: when plugging memory leaks | |
# :haircut: when refactoring | |
# :x: when removing code or files | |
# :art: when improving the format/structure of the code | |
# :book: when writing docs | |
# :white_check_mark: when adding tests | |
# :shirt: when removing linter warnings | |
# :traffic_light: when fixing the CI build | |
# :arrow_up: when upgrading dependencies | |
# :arrow_down: when downgrading dependencies | |
# -------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To apply the template,
Save the above file to your local machine and use
git config --global commit.template <.git-commit-template.txt file path>
For example, if you saved it to your home folder, try:
git config --global commit.template ~/.git-commit-template.txt