[git-users] Re: Connecting Clones
Ah, Thank you, thank you! This bit did the trick: https://git.wiki.kernel.org/index.php/GitFaq#Why_won.27t_I_see_changes_in_the_remote_repo_after_.22git_push.22.3F I'm the only dev, so I can make sure the remote has no changes in the working tree, but I can see now how the post-commit hook would kick it off just right. Thanks for the pointer in the right direction. On Jun 1, 2:50 pm, Konstantin Khomoutov wrote: > On Jun 1, 9:06 am, ben 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. > > Looks like you should read this > thread:http://groups.google.com/group/git-users/browse_thread/thread/d8d73c1... > > And this subject has been raised more than once here, so may be a > little searching through the history could yield more solutions. -- 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.
[git-users] Re: Connecting Clones
On Jun 1, 9:06 am, ben 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. Looks like you should read this thread: http://groups.google.com/group/git-users/browse_thread/thread/d8d73c1d8b72527b?hl=en And this subject has been raised more than once here, so may be a little searching through the history could yield more solutions. -- 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.
[git-users] Re: Connecting Clones
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ł wrote: > On 1 Cze, 07:30, ben 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 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.
[git-users] Re: Connecting Clones
On 1 Cze, 07:30, ben 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 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.
[git-users] Re: Connecting Clones
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 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. -- 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.