progit2
progit2 copied to clipboard
advocate git config receive.updateServerInfo instead of enabling a post-update hook
https://github.com/progit/progit2/blob/d9acee50e367e82a1dfddd88ca0e5e00c2cc95d5/book/04-git-server/sections/protocols.asc?plain=1#L87-L109
I think instead of installing that hook the code block should look like this:
$ cd /var/www/htdocs/
$ git clone --bare /path/to/git_project gitproject.git
$ cd gitproject.git
$ git config receive.updateServerInfo true
The advantage is, that one can also set this option globally with git config --global
or even --system
, which is nice because it not necessary anymore to handle that hook for each repo individually.