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)
- Set up a bare git repo on my web server in
/home/usr/mysite.git/
- In the bare repo, create an executable post-receive hook with
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://user@ssh.myserver.com/home/usr/mysite.git fetch = +refs/heads/*:refs/remotes/live/*
- Push :
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?