This is a simple command line tool inspired by this gist about semantic
commit messages. In short, it proposed to use labelled commit messages that
derive their format from Angular's commit rules.
The sema command will help you follow these guidelines with no effort on your
part to memorise labels or double-check things.
UPDATE: sema is now in AUR! Install it with pamac (GUI) or yay as
follows:
yay -S sema
Each commit message is supposed to be formatted in the following way:
TYPE(SCOPE): MESSAGE
Where SCOPE tells you about the scope of changes, MESSAGE summarises those
in a concise way, and TYPE is a short label from the following:
feat: new feature for the user
fix: bug fix for the user
docs: changes to the documentation
style: formatting with no production code change
refactor: refactoring production code
test: adding missing tests, refactoring tests
perf: performance improvements
chore: updating grunt tasks
You can see the list of these labels with explanations using sema --more.
Installation
From AUR (for Arch-based Linux)
yay -S sema
go install github.com/sharpvik/sema # => $GOPATH/bin/sema
NOTICE: Make sure that your $GOPATH/bin is in $PATH!
HACK: After the default installation, the sema command will be available.
However, if you rename that binary file to git-sema, you will be able to use
it as follows (as if it's part of the default git tools):
git sema
Usage
sema --help # if you need a usage hint
sema --more # see all label descriptions
sema --add # run 'git add .' before all else
sema --push # run 'git push' after sucessful commit
sema # commit changes in current repo
NOTE: the --push and --add flags can be combined, which will be
equivalent to running the following:
git add .
git commit -m "feat(*): commit description"
git push
Some Screenshots
