Last Updated: July 06, 2018
·
1.877K
· abulte

Better commit messages

To add semantic info (i.e. more meaning for you and the machines) to your commit messages, I propose the use of either of these conventions:

X: explicit *atomic* commit message

Where X can be (v1):

  • F for a new feature
  • B for a bug fix
  • C for cleaning / refactoring
  • D for doc
  • S for installation / deployement / system stuff
  • M for misc (try to avoid)

Or X can be (v2):

  • add: for a new feature
  • fix: for a bug fix
  • clean: for cleaning / refactoring
  • doc: for doc
  • sys: for installation / deployement / system stuff
  • misc: for misc (try to avoid)

Of course you should also link to a maximum of relevant external elements in your commit messages (issue number, feature request...).

4 Responses
Add your response

Kind of a good tip :) thx!

over 1 year ago ·

I like the second version with "add" changed to "feature" and no sys and misc tags. Just don't use any prefix (but try to avoid it).

over 1 year ago ·

misc: for when your repo is so dirty you would spend a year making semantical commits. Then you just commit everything at once.

haha just kidding!

over 1 year ago ·

@fuadsaud, I think we could add a all: tag for this ;-)

over 1 year ago ·