Skip to content

Maintainers

  • Anthuan Vasquez
  • Isaac Martinez
  • Jose Genao

Writing Commits

Before you finish a feature, bug, hotfix or release you need to write a good commit. The commit needs to be clear and contains all the details written in English.

All commits must contain:

  • Title - The title need to follow the same approach from feature, ex <TYPE>[(SCROPE)]: <JIRA-KEY> <TITLE> in a real world example fix(cart): DEN-100 cart page or refactor(cart): DEN-100 add to cart button on product view

  • Body - The body is an extended message to explain What and Why:

  • Add your message

  • Fix your message

  • Remove your massage

  • Change your massage

  • Refactor your massage

  • Release your message

So the complete commit need to be something like:

txt
fix(cart): JIRA-123 minor changes on the cart page

add icon to the checkout button
change the background color for checkout button
remove coupon input, will not be used anymore

see also JIRA-456, JIRA-789

Types

Below is a list of supported types:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing or correcting existing tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
  • revert: Revert to a commit

Follow the conventional commits guide. See how big commerce validate-commits in their projects.

A Commit Template

txt
<type>[optional scope]: <issue-key> <description>

[optional body]

[optional footer(s)]

# ** TYPES **
# feat (new feature)
# fix (bug fix)
# docs (changes to documentation)
# style (formatting, missing semi colons, etc; no code change)
# refactor (refactoring production/functional code)
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
# revert (revert a commit)
#
# ** FOOTERS **
# References #1, #4, and #2.
# Fix #1. note this marks the item as accepted
# Closes #1 and #2. note this marks the item as accepted

Remember to remove placeholders once your commit message its ready (including types and footer references).

Adding the Commit Template to Git global config

To add the commit template to your git config, first create a gitmessage.txt file and paste the commit template, once saved you can remove the .txt extension (optional) then place the file in the following directory for Windows users: C:\Users\username and Mac users: /Users/username and run the following git command.

bash
git config --global commit.template ~/.gitmessage.txt

Filename must have a . at the beginning, ex. .git_template.

Interested to join the team?

Learn more about our recruitment process and open positions.

Join

Join in and collaborate to make our Handbook an even better tool!