Skip to content

Commits

David Mraz edited this page Mar 5, 2018 · 1 revision

The commit message format. The text is taken from https://gist.githubusercontent.com/abravalheri/34aeb7b18d61392251a2/raw/461b70df49e0dcf100e3c20e917df569a43b22f5/commit.md.

Commit Message Format

<type>(<scope>): <subject> <meta>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on github as well as in various git tools.

Subject line may be prefixed for continuous integration purposes. For example, JIRA requires ticket in the beggining of commit message message: "[LHJ-16] fix(compile): add unit tests for windows"

Allowed <type>

  • 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 tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation

Allowed <scope>

Scope could be anything specifying place of the commit change. For example $location, $browser, $compile, $rootScope, ngHref, ngClick, ngView, etc...

<subject> text

Subject line should contains succinct description of the change.

  • use imperative, present tense: “change” not “changed” nor “changes”
  • don't capitalize first letter
  • no dot (.) at the end

Allowed <meta>

Additionally, the end of subject-line may contain twitter-inspired markup to facilitate changelog generation and bissecting.

  • #wip - indicate for contributors the feature being implemented is not complete yet. Should not be included in changelogs (just the last commit for a feature goes to the changelog).
  • #irrelevant - the commit does not add useful information. Used when fixing typos, etc... Should not be included in changelogs.

Message body

  • just as in <subject> use imperative, present tense: “change” not “changed” nor “changes”
  • includes motivation for the change and contrasts with previous behavior

Message footer

Clone this wiki locally