Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_hooks [2019/02/19 11:06] – [During normal operation] rpjday | git_hooks [2019/02/19 11:10] (current) – [Default hook installation for a new repository] rpjday | ||
|---|---|---|---|
| Line 35: | Line 35: | ||
| * Make sure they are marked as executable. | * Make sure they are marked as executable. | ||
| - | * Remove the '' | + | * Remove the '' |
| + | ===== Where hooks are effectively run ===== | ||
| + | |||
| + | From '' | ||
| + | |||
| + | < | ||
| + | Before Git invokes a hook, it changes its working directory to | ||
| + | either $GIT_DIR in a bare repository or the root of the working | ||
| + | tree in a non-bare repository. An exception are hooks triggered | ||
| + | during a push (pre-receive, | ||
| + | push-to-checkout) which are always executed in $GIT_DIR. | ||
| + | </ | ||
| ===== commit-related client-side hooks ===== | ===== commit-related client-side hooks ===== | ||