[Git]: Categorize your GitHub Commit Messages

git

03/20/2020


Uncategorized commit messages

uncategorized

Categorized commit messages

categorized

Categorizing Commit Messages

It is completely optional and can be a bit of extra work to categorize your github commit messages, but it clearly improves a readability. Below is the list of "tags" that I use when I write commit messages—most are self-explanatory.

BASH
[INITIAL] # Used for initial commits
[ADD] # Newly added features / components
[UPDATE] # Used for updated existing features
[STYLES] # Commits regarding styles
[REFACTOR] # Used when restructured existing codes, usually for better performance
[FIX] # Used to denote fixes
[DOCS] # Documents related i.e. README
[REVERT] # When commit was reverted back to previous code
[PRODUCTION] # Production related commits
[WIP] # Used to denote Work In Progress for commits that are not final

Sometimes a commit message seems to fall into more than one category. I simply use multiple tags such as [REFACTOR & ADD], [ADD & WIP], ...

Setting Alias

You can set alias to use categorized commit messages. Refer to Setting Alias on Terminal post.


WRITTEN BY

Keeping a record