Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Tlaloc-Es/bc6e214dfa8e76798cfe1220e2cb0687 to your computer and use it in GitHub Desktop.
Save Tlaloc-Es/bc6e214dfa8e76798cfe1220e2cb0687 to your computer and use it in GitHub Desktop.
Semantic Commit Messages with Emojis

Semantic Commit Messages with Emojis

Commit format: <emoji_type> <commit_type>(<scope>): <subject>. <issue_reference>

Example

:sparkles: feat(Component): Add a new feature. Closes: #
^--------^ ^--^ ^-------^   ^---------------^  ^------^
|          |    |           |                  |
|          |    |           |                  +--> (Optional) Issue reference: if the commit closes or fixes an issue
|          |    |           |
|          |    |           +---------------------> Commit summary
|          |    |
|          |    +---------------------------------> (Optional) Commit scope in the project
|          |
|          +--------------------------------------> Commit type: feat, fix, docs, refactor, test, style, chore, build, perf or ci
|
+-------------------------------------------------> (Optional) Emoji type. See: https://gitmoji.carloscuesta.me/

The commit message will be:

feat: Add a new feature

With optional features emoji, scope and issue reference:

✨ feat(Component): Add a new feature. Closes: #..

Commit Message Types

  • feat: introducing a new feature to the codebase
  • fix: fixing a bug in the codebase
  • docs: adding or updating the documentation
  • refactor: refactoring the production code
  • build/conf: changes related to the build system (involving scripts, configurations) and package dependencies
  • test: adding tests (no production code change)
  • ci: changes related to the continuous integration and deployment system
  • style: improving structure/format of the code e.g. missing semi colons (no production code change)
  • chore: updating grunt tasks etc. (no production code change)
  • perf: changes related to backward-compatible performance improvements

Supported Emojis by Commit Message Types

Type Emoji
feat :sparkles:
fix 🐛 :bug:
docs 📝 :memo:
refactor ♻️ :recycle:
build 👷 :construction_worker:
test :white_check_mark:
ci 💚 :green_heart:
style 🎨 :art:
chore 🔧 :wrench:
perf :zap:

Besides the emojis of these commit types, other related emojis can also be used in the commit messages. For example:

:construction_worker: build(Electron): Bump version 7 to 9 :arrow_up:

👷 build(Electron): Bump version 7 to 9 ⬆️

Issue Referencing

Keywords to close an related issue with the commit:

  • close
  • closes
  • closed
  • fix
  • fixes
  • fixed
  • resolve
  • resolves
  • resolved

You can use the phrase: Fixes: #1 or Fixes #1. Once the branch is merged into the default branch, the issue will close.

References

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