New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Help with Spock and .git repo above webroot

Peter Emil van den Berg March 25, 2019 by Peter Emil van den Berg

Like Jeremy Saxton in I have my git repo set up above root on the production server, so like this

  • silbersee.git
  • public_html
    • [files for website]

In the post-receive hook I inserted the working tree

GIT_WORK_TREE=/home/deb81801/domains/ git checkout -f

But changes made using the CP give following log error

[2019-03-25 16:38:26] production.ERROR: Spock command exited unsuccessfully:
Command: git add /home/deb81801/domains/
Output: No output
fatal: Not a git repository (or any of the parent directories): .git

Where do I insert the GIT_WORK_TREE in Spocks settings so Spock knows where to commit?

Answered by Jack McDade!
>>>>>>> Answered <<<<<<<
26 Replies