I spent a whole week researching this and found no answer. So, I'm hoping
that someone here could help me. Here's my situation which I don't think is
so unique or strange.
I have a generic website that I always use as my starting point to build
websites for all of my clients. Since each client's needs are different, I
end up editing different parts of the original code. (In other words, I
cannot separate and isolate files that all sites share in common.) As you
could imagine, without some sort of version control, it would be very
difficult to manage all the websites. The same fix/change would have to be
applied to all the sites individually.
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.
Now, I would like to switch to Git because it's more powerful overall, but
I cannot figure out how I can manage these sites with Git. I searched this
Google Group and found someone who asked a similar question. I also asked
some of my programmer friends who have been using Git for a long time. They
all suggested to create a fork for each website. I thought it would work,
so I started implementing this but hit a wall. The issue is that on Github,
each fork requires a unique user. Say, I create the "Official" repo under
my "Organization" account. The URL would be:
I then create a fork of this, and I would end up with:
Now, if I want to create another site, I would have to create a new user
because each fork is differentiated only by the user name. If I have to
create a new user for each website, eventually, I'll end up with a whole
bunch of user accounts to manage. And, since this must be a private repo,
each user would cost $7 a month and it can quickly amount to thousands of
dollars a year. So, this strategy hit a wall here.
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
that the users upload (like photos). You wouldn't want to put them into the
repo but you do need them to switch when you change from one website to
next. Managing all this would be confusing and difficult under the same
Submodules and Subtree are two other suggestions but these would require me
to separate and isolate the files that are common to all sites. As I said
above, I cannot do this because each client has different needs.
I don't think my situation is so uncommon. It's a situation where you spin
off a bunch of different versions from the same original codebase and each
is a legitimate product of its own (not a temporary state to be discarded
or merged at some point). Git is a powerful and flexible tool, so I'm
thinking that there HAS TO BE a solution for this. If anyone has any idea,
I would appreciate it very much (I would buy you lunch if you are in New
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
For more options, visit https://groups.google.com/groups/opt_out.