Skip to content

Instantly share code, notes, and snippets.

@arnauldvm
Last active April 10, 2019 06:53
Show Gist options
  • Save arnauldvm/8c4d04fc40f064017144ff08ddfdfd26 to your computer and use it in GitHub Desktop.
Save arnauldvm/8c4d04fc40f064017144ff08ddfdfd26 to your computer and use it in GitHub Desktop.
git style guide

Remember:

| {type}({scope}): {subject} | | {body} (optional) |

{type}:

  • feat (new feature for the user, not a new feature for build script)
  • fix (bug fix for the user, not a fix to a build script)
  • docs (changes to the documentation only)
  • style (formatting, missing semi colons, etc; changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc); no production code change)
  • refactor (refactoring production code, eg. renaming a variable; a code change that neither fixes a bug nor adds a feature)
  • test (adding missing tests, refactoring/correcting(?) tests; no production code change)
  • chore (updating grunt tasks etc; no production code change)
  • perf (a code change that improves performance)
  • build (changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm))
  • ci (changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs))
  • revert

What about:

  • add ?

Suggestions:

  • updating release number: chore
  • clean-up code: refactor

{scope}:

  • The scope should be the name of the "packagee affected
  • init
  • runner
  • watcher
  • config
  • web-server
  • proxy
  • common
  • core
  • forms
  • router
  • etc.

{subject}:

  • uses the imperative, present tense: "change" not "changed" nor "changes"
  • start with a lowercase
  • should be short (max 70 chars in total)

{body}:

  • optional
  • starts with BREAKING CHANGE if appropriate

See also:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment