Skip to content

Instantly share code, notes, and snippets.

@CSalih
Last active October 13, 2022 09:13
Show Gist options
  • Save CSalih/3a7762074005b25bacf95c9f9e383258 to your computer and use it in GitHub Desktop.
Save CSalih/3a7762074005b25bacf95c9f9e383258 to your computer and use it in GitHub Desktop.
Git commit convention

Git Conventional Commits

Note: This Gist is deprecated. The Documentation was moved to notion.

Guidelines

A git commit message has three parts: header, body and footer.
The header is required and is build with a type and a summary. body and footer are optional.

Structure of a commit:

<type><(optional scope)>: <summary>

<body>

<footer>

Header

Type

  • feat: A new feature
  • fix: A bug fix
  • refactor: A code change that neither fixes a bug nor adds a feature
  • docs: Documentation only changes
  • ci: Changes to CI configuration files and scripts or affects the build system
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • revert: Revert of a previous commit (include the commit hash in the body)

Summary

  • should not more than 50 characters but at most 72.
  • use the imperative, present tense (e.g. "change" not "changed" nor "changes")
  • don't capitalize the first letter
  • no dot (.) at the end

Imperative Hint: Summary should be able to complete the following sentence: If applied, this commit will ...
e.g. If applied, this commit will release version 1.0.0

Body

A brief description of the change. See [Git Commit Good Practices]

Footer

Breaking Changes should have a BREAKING CHANGE: with a space or two newlines. The rest of the commit message is then used for this. See [Git Tailers]

Examples

docs(guide): updated fixed docs from Google Docs

Couple of typos fixed:
- indentation
- batchLogbatchLog -> batchLog
- start periodic checking
- missing brace
feat($compile): simplify isolate scope bindings

Changed the isolate scope binding options to:
  - @attr - attribute binding (including interpolation)
  - =model - by-directional model binding
  - &expr - expression execution binding

This change simplifies the terminology as well as
number of choices available to the developer. It
also supports local name aliasing from the parent.

BREAKING CHANGE: isolate scope bindings definition has changed and
the inject option for the directive controller injection was removed.

To migrate the code follow the example below:

Before:

scope: {
  myAttr: 'attribute',
  myBind: 'bind',
  myExpression: 'expression',
  myEval: 'evaluate',
  myAccessor: 'accessor'
}

After:

scope: {
  myAttr: '@',
  myBind: '@',
  myExpression: '&',
  myAccessor: '='
}

Reference

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