Seravo/wordpress

Error in post-receive hook: fatal: not a git repository

JoosuaKoskinen opened this issue · 4 comments

A customer noticed the following error while pushing to production after installing the post-receive hook:

remote: Seravo: running post-receive git hook
remote: fatal: not a git repository: '.'
remote: Seravo: Flushing all caches...

Probably due to removal of the GIT_DIR in this commit
e59b4f0#diff-8023fc70ccc637626d348363aec8ae0dL22

Using GIT_DIR indeed fixes it.

ottok commented

Can you @JoosuaKoskinen fix this and document properly GIT_DIR so nobody in the future removes it thinking it has no purpose (as on local runs it has no purpose, there is only the remote push use case I think?)