How to commit like a pro

Method: Conventional Commits

Advantages

  1. Automatically generate changelogs
  2. Determine semantic version based
  3. Structured commit history

Structure

1
2
3
4
5
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
  1. type:
  • fix - use for bug fixes
  • feat - use for code features
  • build - use for build changes
  • style - use for styling changes
  • chore - use for other changes
  • refactor - use for refactoring code
  • ci - use for CI changes
  • test - use for test changes
  • docs - use for documentation changes
  1. Optional scope:
  • Any additional information
  • use nouns
  1. Description:
  • Use imperative mood
  • Use present tense
  • Use first letter capitalized
  • No period at the end
  • No dot at the end
  1. Optional body:
  • Free form
  • Explain changes you’ve made
  1. Optional footer(s):
  • Word token used
  • Example:
    1
    2
    3
    Resolves #10
    Development-Method: Pair Programming
    With: James