I've been trying to set up Git to manage my website, as explained per this tutorial and this one and this one and this one and this gist.
To summarize what I've done: (in-depth explanations can be found in the tutorials)
/home/usr/mysite.git/
GIT_WORK_TREE
set to my web documents root, /home/www/mysite.com/
In my local git repo, add the remote repository. This is from my .git/config
:
[remote "live"]
url = ssh://[email protected]/home/usr/mysite.git
fetch = +refs/heads/*:refs/remotes/live/*
git push live +master:refs/heads/master
Here's the output I get:
Everything up-to-date
Great!
Except it isn't : my remote web documents root /home/www/mysite.com/
is still empty.
I've tried everything I could but haven't been able to push the files into my remote folder.
Do you know what I've done wrong, or what I could do to debug this?
The repo might in fact be up-to-date. Verify that by running git show
on your server.
Instead, maybe your post-receive hook isn't actually executed. If so, maybe because it isn't set as executable?