I\'m implementing this approach to send updates to my website:
created bare repository to push to
$ mkdir website.git && cd website.git
$ git
Another possible cause for post-receive hook trouble is identified and fixed in Git 2.13 (Q2 2017): if the GIT_WORK_TREE is set to an invalid path.
See commit ce83ead, commit aac3eaa (08 Mar 2017) by Johannes Schindelin (dscho).
(Merged by Junio C Hamano -- gitster -- in commit ba37c92, 13 Mar 2017)
Example (which would crash with Git 2.12 only)
GIT_WORK_TREE=/.invalid/work/tree &&
export GIT_WORK_TREE &&
git rev-parse
# dies with error code 128
The bug was introduced in Git 2.12.