From: Carlos Pereira <jose.carlos.pereira@ist.utl.pt>
To: git@vger.kernel.org
Subject: git best strategy for two version development
Date: Sat, 08 Feb 2014 02:06:41 +0000 [thread overview]
Message-ID: <52F59131.5000808@ist.utl.pt> (raw)
Hello,
I am a git and CVS newbie, I bought and red most of the excellent Pro
Git book by Scott Chacon, but I still have a doubt. I have a package
that I distribute in two versions differing only in one library:
version_A uses this library, version_B uses my own code to replace it.
For strategic reasons I want to keep it this way for the time being.
Both versions have the same documentation, the same data files, and 99%
of the source code is the same (a few makefile changes, two additional
files in version_B and some minor changes: a diff -r has only 170
lines). The question is what is the best strategy to manage a situation
like this with git?
Shall I maintain two different repositories? I don't think so...
Apparently the best solution would be to maintain two long term
branches, say mater_A and master_B, and merge all later developments in
both branches, keeping the initial difference... Specifically:
1) do some new work in branch master_A, commit, etc.
2) checkout master_B and merge the new work in master_B, without merging
the initial diff between the two versions.
What is the better way to do that?
I suppose this is a fairly common situation, for example, some
standalone code distributed with two different GUI toolkits. I could
carefully choose which commits should be merged in both branches (the
changes in standalone code) and which should not (the changes in GUI
code), but that is error-prone and seems to miss the whole point of
using a managment system...
How shall I handle this? Thanks for your help!
Regards,
Carlos Pereira,
http://www.gamgi.org/
next reply other threads:[~2014-02-08 2:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-08 2:06 Carlos Pereira [this message]
2014-02-08 3:56 ` git best strategy for two version development brian m. carlson
2014-02-08 8:55 ` Carlos Pereira
2014-02-08 12:09 ` Øystein Walle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52F59131.5000808@ist.utl.pt \
--to=jose.carlos.pereira@ist.utl.pt \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.