Skip to content

Instantly share code, notes, and snippets.

@bengerman13
Created April 15, 2025 20:01
Show Gist options
  • Save bengerman13/4d0f6a12ef4d05876241ca37df2f68b1 to your computer and use it in GitHub Desktop.
Save bengerman13/4d0f6a12ef4d05876241ca37df2f68b1 to your computer and use it in GitHub Desktop.
Nudge yourself to use conventional commits

Nudge yourself to use Conventional Commits

If you want to use conventional commits, but always forget until it's too late, you can edit your commit template to nudge you to use them

# Please follow the conventional commits specification:
# <type>(<scope>): <subject>
#
# Types:
#   feat:     A new feature
#   fix:      A bug fix
#   chore:    Routine tasks like build scripts or dependency updates
#   docs:     Changes to documentation only
#   style:    Changes that don't affect code logic (e.g., formatting)
#   refactor: Code changes that neither fix a bug nor add a feature
#   test:     Adding or updating tests
#   perf:     Code changes that improve performance
#   ci:       Changes to CI configuration files or scripts
#
# Examples:
# feat(dbt): add customers_monthly_summary model
#
# Reference Ticket: org/repo#number
#
# feat(models)!: remove address column from customers model
#
# BREAKING CHANGE: The `address` column has been removed from the `customers` model
# 
# Keep the subject line under 50 characters.
  1. Save the above contents to a text file. You get to decide where to Mine lives in ~/.git-support/gitmessage.txt
  2. Tell git to use this file for your commit message template with git config --global commit.template /path/to/file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment