6) Git gotchas

1) Setting a post-receive hook

Very easy as a matter of principle : rename hooks/post-receive.sample into hooks/post-receive.

Gotcha : I got ‘not a git directory’ error. Strangely, when I launched the script from cli, it worked like a charm.
=> exactly same pb as described here

Solution is also here : GIT_DIR env var was the culprit => unsetting it solved the issue.
BUT, not solved:
– why setting via EXPORT could not help
– not found the way to actually view the value of said env var GIT_DIR (where is the value set/stored ?).

All in all, the link offered a solution, but I do not comprehend how GIT_DIR is managed…

Ce contenu a été publié dans Non classé. Vous pouvez le mettre en favoris avec ce permalien.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *