force fail commit on master
Most of the time, you want to fail if you mistakenly commit to master. This is if you normally work with feature branch. This script can make git commit fail if the branch is master
add to .git/hooks/pre-commit
or you can check out pre-commit a framework to manage your git commit scripts
Previousdifferent between two dots and threeNextgit finish helper script delete current branch and update master
Last updated