I'm brand new to Git and I was following this tutorial to set up a Git workflow on my local machine and remotely. I am the sole developer on this project.
The project uses the Laravel PHP framework. I want the application files outside of the public folder and the public files within a directory under a public_html folder that was viewable on the web. My local files are setup like this:
grapejuice/ (repository top)
grapejuice/ (app files)
public_html/
grapejuice/ (public files)
On my hosting service, I have other websites as well listed under the public_html directory, so I needed a to separate this projects' folders from the other websites, hence the subdirectory under public_html.
I'm getting hung up on when I try to reflect my push changes to the working files on the remote server. I'm following the above tutorial and created a post-receive hook. My hook looks like this:
#!/bin/bash
git --work-tree=/home3/ambuoyan --git-dir=/home3/ambuoyan/grapejuice.git checkout -f
However, when I run commit and push to the bare remote repository, I get a list of the git remote
usage options and this message:
remote: hooks/post-receive: line 3: --git-dir=/home3/ambuoyan/grapejuice.git: No such file or directory
To ssh://username@website.com/home3/ambuoyan/grapejuice.git
f94473c..42ce6aa master -> master
So I'm confused. The directory does exist, I know it does. Did the command partially work or not at all? When I try to push again, it says there are no changes so I think at least the bare repository is up to date, but none of my working files are being reflected remotely.