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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Jan 4, 2010 at 2:29 PM, Christian C. Schouten <info@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]