Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A template to help you write better commits
######## Subject Line (50 characters) ############
# - Use the imperative mood (imagine the words "This will")
# - Capitalize the first letter
# - Limit to 50 characters
# - Do not end the subject line with a period
######## The Body (72 characters per line) #############################
# - Add line breaks so each line is a maximum of 72 characters
# - Explain the thinking behind the commit
# - Do not use Markdown
######## Issue or Ticket Reference ########
# - The last line should reference the issue or ticket
@tarecord

This comment has been minimized.

Copy link
Owner Author

@tarecord tarecord commented Jan 14, 2021

Add this template to your git config:

  • Create a plain text file (I use ~/.git/.commit_template) and copy over the template
  • Add the template to your git config git config --global commit.template /path/to/.commit_template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment