Home

Awesome

Semantic Git commit messages

Inspired by Sparkbox's awesome article on semantic commit messages.

What is this?

These are very simple custom git commands that enforce the git user to write better git commit messages. If still confused, read the article above.

Installation:

  1. Clone this repo, preferably in your $HOME directory.
git clone https://github.com/fteem/git-semantic-commits ~/.git-semantic-commits

Tip: If you're using Cygwin, open it and type echo $USERPROFILE. This will show you the location of the $HOME directory.

  1. Install it as a set of bash scripts or git aliases:
cd ~/.git-semantic-commits && ./install.sh --scripts
cd ~/.git-semantic-commits && ./install.sh

Tip: Installation script is idempotent and could be harmlessly executed multiple times. It adds bash scripts to the PATH in your ~/.bashrc or ~/.zshrc files or adds git aliases to the ~/.gitconfig file respectively (without any duplication).

  1. Commit away!

Usage

There are 8 new Git commands now.

New command -> what it does:

If you would like to add an optional scope, as described here, use the '-s' flag and quote the scope message:

If you would still like to use your text editor for your commit messages you can omit the message, and do your commit message in your editor.

Aliases for those who use git-extras (will be installed only if you have git-extras):

Uninstallation

You can manually uninstall git-semantic-commits by:

How to contribute

Open a pull request/issue or fork this repo and submit your changes via a pull request.