Skip to content

Instantly share code, notes, and snippets.

@cmendez20
Created January 11, 2024 21:29
Show Gist options
  • Save cmendez20/d3b15d54585760ed57dda1e606447bc0 to your computer and use it in GitHub Desktop.
Save cmendez20/d3b15d54585760ed57dda1e606447bc0 to your computer and use it in GitHub Desktop.
git commit messages
1. create .gitmessage in template in home directory
2. git config --global commit.template ~/.gitmessage
3. set vscode as core editor: git config --global core.editor "code --wait"
# Title: Summary, imperative, start upper case, don't end with a period
# No more than 50 chars. #### 50 chars is here:
# Remember blank line between title and body.
# Body: Explain _what_ and _why_ (not _how_). Include task ID (Jira issue).
# Wrap at 72 chars. ################################## which is here:
# At the end: Include Co-authored-by for all contributors.
# Include at least one empty line before it. Format:
# Co-authored-by: name <[email protected]>
#
# How to Write Conventional Git Commit Message:
# <type>[optional scope]: <description>
# [optional body]
# [optional footer(s)]
#
# 1. Separate subject from body with a blank line
# 2. Limit the subject line to 50 characters
# 3. Do not capitalize the subject line
# 4. Do not end the subject line with a period
# 5. Use the imperative mood in the subject line
# 6. Wrap the body at 72 characters
# 7. Use the body to explain what and why vs. how
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment