splat-client-git-hooks.sh is a "run once" script that:
- finds all your repos given a root directory (e.g. ~/src)
- then, for each repo it:
- copies the
pre-commit,pre-pushandlocal-or-remote-master-check.shfiles in ./dot-git/hooks/ to the repo's .git/hooks directory.
- copies the
It does this to make all your repos' master branches "protected" i.e.
you will be unable to commit to master or push to origin/master.
this is essentially a fancy grep invocation that checks if the current branch is master when you're committing or pushing. That's it.