Thanks Marek! That got me setup. I had a few other issues that were preventing me from pushing (namely, git was not in my $PATH for sshd (the non interactive shell). I added the path to .bashrc as well as .bash_profile, and I was able to "git push".
Is there a reason for not making ./public_html/stage the main repo? I keep seeing folks doing the --bare-init for their repo, then cloning that and adding post-update or post-commit hooks to update the files. On May 31, 11:46 pm, Marek Wywiał <onj...@gmail.com> wrote: > On 1 Cze, 07:30, ben <bklo...@gmail.com> wrote: > > > > > I need to add that I don't have the git-daemon on the server, it's a > > shared host. > > > On May 31, 10:06 pm, ben <bklo...@gmail.com> wrote: > > > > I've created a clone (lets call it Dev) of local project (Core), and > > > want to create a remote repo of Dev on a server (Staging) with a > > > working tree (the actual files). > > > > How do I setup the remotes so that I can push from Dev to Staging? > > > > Is this the wrong way to do it? Should I also have a bare repo on the > > > server as origin for everything, then just checkout a staging branch > > > when in Staging? > > > > The catch here is that I've created Core locally, so I can start a new > > > project and have all the benefits of Core, and get updates by pulling > > > when Core itself is updated. > > on the remote server (prod) create remote repo by: > mkdir -p src/myapp.git > cd src/myapp.git > git --bare init > > on your local repo add remote with name 'stage' (you can use any > name): > git remote add stage ssh://u...@host:src/myapp.git > > then you push from local to repo to just defined remote repo: > git push stage master # or other branch/tag > > now on remote server you can checkout from remote repo: > git clone src/myapp.git ./public_html > > and try some automatic, into src/myapp.git/hooks/post-update put: > > #!/bin/sh > > unset GIT_DIR > > cd ~/public_html > git pull > > so after 'git push stage sometag.branch' it'll be auto updated at ~/ > public_html > > i got this information from: > http://www.megiteam.pl/blog/2009/11/1/zeby-bylo-git/- in Polish -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.