Remark - make your commit messages awesome

Go Report Card License

CLI tool that help to format git commit messages.

make your commit messages awesome and keep your team happy

Rules for a great git commit message style

  • separate subject from body with a blank line
  • do not end the subject line with a period
  • do not capitalize the subject line and each paragraph
  • use the imperative mood in the subject line
  • wrap lines at 72 characters (less is better)
  • use the body to explain what and why you have done something

Commit Message Format

All Commit Message Format MUST meet this Text Format:

[:<Emoji>: ][<Type>[(<Scope>)]: ]<Subject>
[<BLANK LINE>]
[<Message Body>]

Types

Type Description
feature for new feature implementing commit
fix for bug fix commit
security for security issue fix commit
performance for performance issue fix commit
improvement for backwards-compatible enhancement commit
breaking for backwards-incompatible enhancement commit
refactor for refactoring commit
docs for documentation commit
example for example code commit
test for testing commit
dependency for dependencies upgrading or downgrading commit
config for configuration commit
release for publishing commit
update for update commit
wip for work in progress commit
revert for revert commit

Scope

The scope could be anything specifying place or category of the commit change.

Subject

The subject contains succinct description of the change:

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

Message Body

The body should include the motivation for the change and contrast this with previous behavior. Just as in the Subject, use the imperative, present tense: “change” not “changed” nor “changes”.

Emojis

Emoji Type Description
⭐️ feature add new feature
🐛 fix fix bug issue
🔒 security fix security issue
📈 performance fix performance issue
⚡️ improvement update backwards-compatible feature
💥 breaking update backwards-incompatible feature
🚨 refactor remove linter/strict/deprecation warnings
test add tests
📝 docs update documentation
🍭 example for example or demo codes
📌 dependency pin dependencies
🔧 config update configuration
🚀 release deploy to production enviroment
🔙 revert revert commiting
🚧 wip WIP commiting
🚚 move move or rename files, repository, …

Examples

feature:

⭐️ feature(remark): add 'preview' option

bug fix:

🐛 fix(remark): stop panic when limit < 0

Closes #12

improve performance:

📈 performance(remark): remove 'limit' option

The limit option has been removed. The default limit of 60 characters is always used for performance reason.

revert:

🔙 revert: feature: add 'limit' option

This reverts commit 567eaa1234a317a14561c17617a972212a416a19.

How to use remark

Here how to pipe remark output to git commit message

remark feature -scope taskmanager "active mq subscriber" | git commit -F -

TODO

  • test cases!! Yes I know…but I wrote this code during my commuting on the train…no ..no excuses! test cases! :-)
  • better text wrap alghorithm

References