Git commit template to improve your project's commit messages.
If you want to learn why we use this kind of template, see our repo How to write a great git commit message.
If you want to improve your git speed and capabilities, see our project GitAlias.
The template is below and is also at this link: git-commit-template.txt
##################################################
# Write a title summarizing what this commit does.
# Start with an uppercase imperative verb, such as
# Add, Drop, Fix, Refactor, Bump; see ideas below.
# Think of your title as akin to an email subject,
# so you don't need to end with a sentence period.
# Use 50 char maximum, which is this line's width.
##################################################
Add your title here
########################################################################
# Why is this change happening?
# Describe the purpose, such as a goal, or use case, or user story, etc.
# For every line, use 72 char maximum width, which is this line's width.
########################################################################
Why:
########################################################################
# How is this change happening?
# Describe any relevant algorithms, protocols, implementation spec, etc.
# For every line, use 72 char maximum width, which is this line's width.
########################################################################
How:
########################################################################
# Add any tags you want, such as search text, hashtags, keywords, codes.
# For every line, use 72 char maximum width, which is this line's width.
########################################################################
Tags:
########################################################################
#
# ## Help ##
#
# This git commit template is available at:
# https://github.com/joelparkerhenderson/git-commit-template
#
# How to write a good git commit message:
# https://github.com/joelparkerhenderson/git-commit-message
#
# Subject line imperative uppercase verbs:
#
# Add = Create a capability e.g. feature, test, dependency.
# Drop = Delete a capability e.g. feature, test, dependency.
# Fix = Fix an issue e.g. bug, typo, accident, misstatement.
# Bump = Increase the version of something e.g. a dependency.
# Make = Change the build process, or tools, or infrastructure.
# Start = Begin doing something; e.g. enable a toggle, feature flag, etc.
# Stop = End doing something; e.g. disable a toggle, feature flag, etc.
# Optimize = A change that MUST be just about performance, e.g. speed up code.
# Document = A change that MUST be only in the documentation, e.g. help files.
# Refactor = A change that MUST be just refactoring.
# Reformat = A change that MUST be just format, e.g. indent line, trim space, etc.
# Rephrase = A change that MUST be just textual, e.g. edit a comment, doc, etc.
#
# For the subject line:
#
# * Use 50 characters maximum.
#
# * Do not use a sentence-ending period.
#
# For the body text:
#
# * Use as many lines as you like.
#
# * Use 72 characters maximum per line for typical word wrap text.
#
#
# ## Trailers ##
#
# Trailers suitable for tracking and also for `git interpret-trailers`.
#
# Example of "See:" trailers that mean "see this additional information"
# and links to relevant web pages, issue trackers, blog posts, etc.:
#
# See: https://example.com/
# See: Issue #123 <https://example.com/issue/123>
#
# We like to use the "See:" trailers to link to issue trackers (e.g. Jira,
# Asana, Basecamp, Trello), document files and folders (e.g. Box, Dropbox),
# UI/UX designs (e.g. Figma, Lucidchart), reference pages (e.g. Wikipedia,
# internet RFCs, IEEE standards), and web posts (e.g. StackOverflow, HN).
#
# Example of "Co-authored-by:" trailers that list each author's name
# and their preferred commit message email address or contact URL:
#
# Co-authored-by: Alice Adams <[email protected]>
# Co-authored-by: Bob Brown <https://bob.example.com>
#
# We like to use the "Co-authored-by:" trailers when we pair program,
# triple program, and group program. These are parsed automatically by
# some version control services (e.g. GitHub, GitLab) and will link
# to the authors' accounts and show up on the authors' commit history.
#
# Example of "Sponsored-by:" trailers that list each sponsor's name,
# which could be a person's or organization's, and contact email or URL:
#
# Sponsored-by: Adam Anderson <[email protected]>
# Sponsored-by: Bravo Organization <https://bravo.example.com>
#
# The git tools require trailers to be last in a commit message,
# and must be one trailer per line, and with no extra lines between.
#
#
# ## About ##
#
# This is our team's starting point for our git commit messages.
# You can edit this template as you like, to customize it.
#
# For more information about git commit ideas and help:
# https://github.com/joelparkerhenderson/git-commit-message
#
#
# ## Usage ##
#
# Put the template file here:
#
# ~/.git-commit-template.txt
#
# Configure git to use the template file by running:
#
# git config --global commit.template ~/.git-commit-template.txt
#
# Add the template file to the ~/.gitconfig file:
#
# [commit]
# template = ~/.git-commit-template.txt
#
# If you prefer other file locations or ways of working,
# you can freely adjust the usage as you like.
#
#
# ## Usage needs commit.cleanup strip ##
#
# This template intends for the commit to strip the comments.
#
# To strip the comments, your git `commit.cleanup` config must be `strip`.
#
# If you don't use `strip`, then these commit comments won't be deleted.
#
#
# ## More ideas ##
#
# Some teams like to add a git commit message verification processes,
# such as a git pre-commit hook that runs a linter on the message text.
#
# In our experience, this can be helpful especially if the linter can
# provide advice that explains how to make the message better.
#
#
# ## Tracking ##
#
# * Package: git-commit-template
# * Version: 7.2.0
# * Updated: 2022-11-22T00:55:28Z
# * Licence: GPL-2.0-or-later or contact us for custom license.
# * Contact: Joel Parker Henderson (http://joelparkerhenderson.com)
#
########################################################################
### GIT TRAILERS -- THESE MUST BE LAST IN THE COMMIT MESSAGE ###
# Git trailers are optional. Use them if you want, how you want.
# The trailers below are provided as examples that you can customize.
# For example, you can add any relevant links to a blog post, or graphic
# design images, or industry publications, specifications, tickets, etc.
#See: Description <https://example.com/...>
#See: Description <https://example.com/...>
# If the commit is written by multiple people, then use the git trailers
# to thank each person as a co-author; various git tools can track this.
#Co-authored-by: Name <[email protected]>
#Co-authored-by: Name <[email protected]>
# If the commit is sponsored by a person or company, then add them here.
# This kind of trailer is more-frequent in open source funding projects.
#Sponsored-by: Name <[email protected]>
#Sponsored-by: Name <[email protected]>