This intercepts your commit message and converts to the predefined template.
- Download
install.sh
,.commit-message-templates
. - Place two files in the your repository path.
- Execute
install.sh
. - Customize
.commit-message-templates
to your rule. - Commit with message like
{keyword}|{message}
.
Content of .commit-message-templates
is consist of three part.
keyword
, gitmoji
, type
.
Here is example.
keyword,gitmoji,type // DO NOT EDIT THIS
bug,🐞,Fix
imp,⚡️,Improve
mg,🔀,Merge
acf,🔧,Add
ucf,🔧,Update
These templates mean the following table.
keyword | gitmoji | type |
---|---|---|
bug | 🐞 | Fix |
imp | ⚡️ | Improve |
mg | 🔀 | Merge |
acf | 🔧 | Add |
ucf | 🔧 | Update |
bug|{message}
=>🐞 Fix: {message}
imp|{message}
=>⚡️ Improve: {message}
mg|{message}
=>🔀 Merge: {message}
acf|{message}
=>🔧 Add: {message}
ucf|{message}
=>🔧 Update: {message}
git commit -m "imp|performance for data validation"
This message will be converted to ⚡️ Improve: performance for data validation
.
git commit -m "improve|performance for data validation"
If improve
is undefined keyword
in the template, the commit fails.