User Tools

Site Tools


git_hooks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
git_hooks [2019/02/19 11:07]
rpjday [Default hook installation for a new repository]
git_hooks [2019/02/19 11:10] (current)
rpjday [Default hook installation for a new repository]
Line 37: Line 37:
   * Remove the ''​.sample''​ suffix (exact spelling is important).   * Remove the ''​.sample''​ suffix (exact spelling is important).
  
 +===== Where hooks are effectively run =====
 +
 +From ''​man githooks'':​
 +
 +<​code>​
 +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,​ update, post-receive,​ post-update,​
 +push-to-checkout) which are always executed in $GIT_DIR.
 +</​code>​
 ===== commit-related client-side hooks ===== ===== commit-related client-side hooks =====
  
git_hooks.txt ยท Last modified: 2019/02/19 11:10 by rpjday