Use gct
to write a better commit quickly.
See the below links to learn what's a better commit:
- https://ruby-china.org/topics/15737
- https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message
- http://ablogaboutcode.com/2011/03/23/proper-git-commit-messages-and-an-elegant-git-history/
- https://web-design-weekly.com/2013/09/01/a-better-git-commit/
git clone https://github.com/fahchen/git-commit-template
ln -s /path/to/gct /usr/local/bin
- you may need to add permition to file.(
sudo chmod +x /usr/local/bin/gct
) cp /path/to/.gittemplate your/gittemplate/path
- modify
your/gittemplate/path
as you want - set
template.file
asyour/gittemplate/path
atyour/gitconfig/file
cd your/git/repo
mkdir .gittemplates
touch .gittempalets/first_commit_message
gct
- chose the template