progit2 icon indicating copy to clipboard operation
progit2 copied to clipboard

advocate git config receive.updateServerInfo instead of enabling a post-update hook

Open datamuc opened this issue 1 year ago • 0 comments

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.

datamuc avatar Feb 11 '23 13:02 datamuc