Skip to content

Git styleguide

Magno Fernando Brixner BiΓ©t edited this page Nov 17, 2017 · 11 revisions

Branch

gitflow

Commit

The reasons for these conventions

  • Automatic generating of the changelog
  • Provide better information when browsing the history

Format of the commit message

<type>(<scope>): <subject>

<body>

<footer>

<type> values

Commit type Emoji
Initial Commit πŸŽ‰ Party Popper
Version Tag πŸ”– Bookmark
New Feature (feat) ✨ Sparkles
Bugfix (fix) πŸ› Bug
Security Fix πŸ”’ Lock
Metadata πŸ“‡ Card Index
Refactoring (refactor) ♻️ Black Universal Recycling Symbol
Documentation (docs) πŸ“š Books
Internationalization (i18n) 🌐 Globe With Meridians
Accessibility β™Ώ Wheelchair
Performance 🐎 Horse
Cosmetic (style) 🎨 Artist Palette
Tooling πŸ”§ Wrench
Tests (test) 🚨 Police Cars Revolving Light
Deprecation πŸ’© Pile of Poo
Removal πŸ—‘οΈ Wastebasket
Work In Progress (WIP) 🚧 Construction Sign
Revert (revert) πŸ”™ Back With Leftwards Arrow Above
Maintain (chore) -

Message <body>, <subject>

Uses the imperative, present tense: "change" not "changed" nor "changes".

Message <footer>

Referencing issues

Generating CHANGELOG.md

List of all subjects since last release

git log <LAST_TAG> HEAD --pretty=format:%s

New features in this release

git log <LAST_RELEASE> HEAD --grep feat

Message template

cd ~
wget -c https://raw.githubusercontent.com/magnobiet/my-coding-style/master/.gitmessage
git config --global commit.template ~/.gitmessage

References

Clone this wiki locally