Related files for use with this project and git.
A collection of useful pre-commit hooks can be found in the pre-commit-hooks
directory.
In the $GOPATH/src/github.com/apache/trafficcontrol/
directory, create a symbolic link from the pre-commit
executable in this directory to the .git/hooks/
directory:
ln -s ../../misc/git/pre-commit .git/hooks/
Now, all executables in the pre-commit-hooks
directory will be run on commit.
Once the pre-commit file is in place, all executables in the pre-commit-hooks
directory will be run. Simply add an executable there. Exiting with non-zero status from this script causes the git commit to abort (the commit contents will be unaffected).
To commit without running the hooks, use the no-verify
flag.
git commit --no-verify