Git hooks and tools to validate development specifications such as:
- Semantic version
- Conventional commit
- Vincent Driessen's branching model
- Languanges specification such as python, go...
-
Download git hooks to init.templateDir
git config --global init.templateDir $HOME/.git-template git clone https://github.com/tzaiyang/git-hooks $HOME/.git-template # Check enviorment and dependencies bash $HOME/.git-template/hooks/scripts/check-dep.sh
Activate git hooks in your repo:
# copy init.templateDir to .git/hooks # you can customize your config to modify in .git/hooks/configs directory git init # deactivate rm -rf .git/hooks
-
Manage branchs according Vincent Driessen's branching model with gitflow-avh tool.
# Initialize a new git repo with support for the branching model. git flow init # start a new feature branch git flow feature start <name> [<base>]
-
Git commit, the commit message should be structured as follows, More detail in conventional commit:
<type>[optional scope]: <description> [optional body] [optional footer(s)]
-
Release with semantic version spec tag according conventional commit specification:
standard-version