On Tue, Jun 18, 2013 at 2:42 PM, Dyske Suematsu <dys...@gmail.com> wrote:
> Currently I manage them with SVN. The original, generic site is in the
> "trunk" and for each new client, I create a branch. If I make a change to
> the trunk that needs to be propagated to all the branches/sites, I just run
> svn merge to merge trunk into branches. I've been doing this for some years
> and it's been working fine.

Do the same thing in git, works fine, its just you can't do a single
clone, and get the trunk and all branches and everything checked out
at the same time. Clone multipe times:

mkdir SITE
cd SITE
for every customer A, B, C
  git clone REPO.git A&& cd A && git checkout origin/A

now you have basically the same thing.

You could do this with different github projects, if for some reason
you wanted your customers to see only a single git repository named
after them, but behind the scenes you would make them all be branchs
of the same code base. The way to do it is to NOT use github's fork
button. Instead, have a main repo, MAIN.git, then make a new one for
each customer A.git, B.git, etc. You would then manage each
independently, using cmd line tools, instead of the github web UI,
pushing and pulling and merging between them.

> Another suggestion, which is obvious but would not work, is to create a
> branch for each website. This wouldn't work because the concept of "branch"
> in Git is almost completely different from SVN. Git does not create a
> separate directory for each branch; it just switches the same directory. So,
> if you have 20 websites, you would have to constantly switch between
> different websites and you could never pull up two sites side-by-side on
> your local machine. Furthermore, websites these days have files and folders

For some reason you seem to be stuck on the notion you can only do a
single git clone on your machine, and you have to do all your work in
that single clone... this isn't even true with svn, I usually have a
svn checkout from root that I sporadically keep up to date, but then
in my working directory I have multiple checkouts of  my projects
trunk, under different names,for different bits of work I'm doing.

So just clone the repo multiple times. You can even recreate the svn
directory structure locally if it makes you feel good:

mkdir -p REPO REPO/branches
cd REPO; git clone repo.git -t master
cd branches; for A, B, C
   git clone ...; git checkout branch ...

> Submodules and Subtree are two other suggestions but these would require me

Stay away from them.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to