Hooks
Last updated
Last updated
Shell scripts to be triggered when certain actions are performed (e.g. commit).
Can be used to automate checks and routine jobs.
Hooks are local. They won't be copied using git clone
.
The hooks are stored in .git/hooks
.
By default, they are deactivated by the extension .sample
.
To use them, remove the .sample
extension, e.g. pre-commit.sample
-> pre-commit
.
The hooks are not limited to Bash, you can use Python or Perl, as long as it can be run from the terminal.