Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: Beginner's question on how to use git for multiple parallel versions

From: Dmitry Potapov <hidden>
Date: 2016-06-15 22:47:58

Hi,

On Mon, Jan 4, 2010 at 2:29 PM, Christian C. Schouten [off-list ref] wrote:
I&#8217;ve got a project that I want to do version management on with git but being a beginner in
cvs/svn/dvcs etc. terminology I don&#8217;t know yet how to set it up.
My project needs to exist as several parallel copies, i.e. there is a &#8220;main version&#8221; in
which I do my development but it needs to end up being available as a couple of different
configurations.
One way to achieve that is to use branches. You create a mainline
branch that will contain
what is common for all versions, and then create a few specific
branches from it. Each branch
will contain their own files, as well as modifications to some common
files if it is necessary.

Changes that a common to all branches should be committed to the
mainline, which is merged
to each version specific branch.

Git allows to quickly switch between branches, so you stay in all
worktree all the time.
Moreover, if you made modifications to some file on branchA but then
realized that it should
be commit to another branch, you can switch to another branch as usual
as long as the
modified files are the same on both branches. (If it is not the case,
you can use git stash).

Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help