Tutorial by Examples

The hooks are all stored in the hooks sub directory of the Git directory. In most projects, that’s .git/hooks. To enable a hook script, put a file in the hooks subdirectory of your .git directory that is named appropriately (without any extension) and is executable.
pre-push script is called by git push after it has checked the remote status, but before anything has been pushed. If this script exits with a non-zero status nothing will be pushed. This hook is called with the following parameters: $1 -- Name of the remote to which the push is being done (Ex: ...

Page 1 of 1