[git-users] Re: Optimal Git setup for multiple websites

2011-04-21 Thread Carey
Thanks for the help Thomas! I can't wait to become a full-fledged Git
user.  Unfortunately, I seem to have left out some finer details,
which I need further guidance on.

First off, the UK website is not the same as the US website, it's two
different code bases, but I suppose I can just replicate what I do for
one, and do the same for the other.

Secondly, you say I have 3 server machines, UK, US, and
local...however I was asking if I need a 4th, or if that's extraneous?

Model 1:   remote developer1 (his/her local machine in California) -
remote server (ie. github/gitfarm) - US webserver
   remote developer2 (his/her local machine in Hawaii) -
remote server (same as above) - US webserver

OR

Model 2:   remote developer1 (his/her local machine in California) -
US webserver
   remote developer2 (his/her local machine in Hawaii) - US
webserver

   remote developer1 (his/her local machine in California) -
UK webserver
   remote developer2 (his/her local machine in Hawaii) - UK
webserver


Lastly, is there a way to set up some kind of hook on the webserver in
your example that does the deploy-website for me when I do the push
from my local machine? It would save the trouble of having to ssh into
the webserver to deploy.  Or is that a bad practice?  Also your link
on how to copy out the contents doesn't work for me.

Thanks again for all the help. Looking forward to more direction, and
please, anyone may chime in!

-- 
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-users@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: Optimal Git setup for multiple websites

2011-04-21 Thread Thomas Ferris Nicolaisen
Yes, if it's two different websites, there's no point in them sharing a 
repository. Have two repositories: website-us and website-uk.

There's nothing wrong with having more machines involved, of course. You can 
clone around the repository as many times as you want.

But before a developer in Hawaii can push to the US webserver, he needs to 
get up to date first (pull in, or rebase the changes others have made on the 
server).

You can set up a hook in the server repositories, more specifically a 
post-receive hook: 
http://www.kernel.org/pub/software/scm/git/docs/githooks.html

It's not bad practice, I think :)

Here's the link again, the key word is *git archive*: 
http://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export
 

-- 
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-users@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: Optimal Git setup for multiple websites

2011-04-21 Thread Carey
Thanks again, Thomas.  Would you suggest having the intermediate
server (Model 1), as opposed to just using the webserver (Model 2), or
vice-versa?

If you do suggest having the intermediate server, can you explain more
about cloning around the repository?  Also, in that case, would I
push from my local machine to the intermediate server, which then
automates a push to the webserver, which in-turn has a hook to
deploy?  Or do I push to both, where the intermediate server is more
like a copy of the webserver.  I'm just getting confused about if I do
need/have that intermediate remote server, and how can I use it
correctly.

-- 
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-users@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: Optimal Git setup for multiple websites

2011-04-21 Thread Thomas Ferris Nicolaisen
Oh, I didn't spot the difference there. Hmm. Well, you can have an 
intermediate intermediate repository if you want. This is a nice place for 
sharing branches and stuff between developers. If you have it push onward to 
the webserver automatically or if you have the developers push themselves.. 
well, of course there's the risk that a developer will push to the webserver 
and forget to push to the intermediate server, and then someone will have to 
clean up after him (e.g. pull from webserver and then push that to 
intermediate)..

You can pick the setup yourself (that's the beauty of git, it's very 
flexible), depends on how much security you need in the process, I guess. 
For more security, force all changes through a intermediate repository.

-- 
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-users@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: Optimal Git setup for multiple websites

2011-04-21 Thread Carey
Almost getting there!  Couple more questions for clarification:

Why is it more secure to force all changes through an intermediate
repository? Or maybe I'm confused on how to force all changes through
an intermediate repositoryHere's the 3 scenarios I'm imagining,
please correct me where I'm wrong.

If I am working on my local machine and do...

0) git checkout stage, make some changes
1) git commit -am Some changes
2) git push uk intermediate_uk (where uk is a remote with the name
uk)
3) git push uk stage (do the same push for the stage webserver)

...isn't that the same amount of security?

Or were you talking about a case where I...


0) git checkout stage, make some changes
1) git commit -am Some changes
2) git push uk intermediate_uk  (and then somehow using a hook, I
don't know how this part works, this then automatically pushes to the
UK webserver/stage)

How is either of those, using the intermediate repo, more secure than
just your initial suggestion of:

0) git checkout stage, make some changes
1) git commit -am Some changes
2) git push uk stage (where uk is a remote with the name uk)


Thanks again!

-- 
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-users@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.