RE: Beginner's question on how to use git for multiple parallel versions
From: Christian C. Schouten <hidden>
Date: 2016-06-15 22:47:58
Dear Bill, Thanks for your prompt reply. It may very well be exactly what I need, but I'm afraid that I don't understand the syntax just yet (am still in the phase orienting on what version management is and how it should be set up). Could you please add to your answer whether I am using branches or another git technique (terminology?) and whether these are instructions that I can use to commit a change once the system has already been set up or if these actually are the instructions for defining the multiplicity of my project versions? Sorry for the newbie-ness and thanks in advance, Best, Chris -----Original Message----- From: Bill Lear [mailto:rael@zopyra.com] Sent: maandag 4 januari 2010 14:29 To: Christian C. Schouten Cc: git@vger.kernel.org Subject: Re: Beginner's question on how to use git for multiple parallel versions On Monday, January 4, 2010 at 12:29:52 (+0100) Christian C. Schouten writes:
Hello all, I'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't know yet how to set it up. My project needs to exist as several parallel copies, i.e. there is a "main version" in which I do my development but it needs to end up being available as a couple of different configurations. For instance, say there is a file table.xml then this needs to contain different rows for versions A and B. Likewise, a file process.bpel needs to be named identical for each version but contain different content depending on whether it is distributed as version A or version B. Any changes made in non-version specific files should be visible in all copies, but changes made to version-specific files need to remain isolated to that particular version.
What you are asking for is this, I think: % git checkout A % cat table.xml <table A> % echo "<table A v2>" > table.xml % git commit -a -m "fix table on Branch A" % git checkout B % cat table.xml <table B> % echo "<table B v2>" > table.xml % git commit -a -m "fix table on Branch B" % git checkout master % cat table.xml <non-version-specific table info> % cat process.bpel main line process stuff % echo "add more process stuff" >> process.bpel % git commit -a -m "fix process stuff on mainline" % git checkout A % git merge master % cat process.bpel main line process stuff add more process stuff % git checkout B % git merge master % cat process.bpel main line process stuff add more process stuff Is that not it? Bill