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
  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:


  unset GIT_DIR

  cd ~/public_html
  git pull

so after 'git push stage sometag.branch' it'll be auto updated at ~/

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 
For more options, visit this group at 

Reply via email to