git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Bill Lear <rael@zopyra.com>
Date
Jan 4, 2010, 13:29 UTC
Message-ID
<19265.60728.17437.665860@blake.zopyra.com>
In-Reply-To
<F8CC469C9CCA415696101414EA997C0.MAI@sohosted19.com>
On Monday, January 4, 2010 at 12:29:52 (+0100) Christian C. Schouten writes:
Show 15 quoted lines
>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
Previous: Christian C. SchoutenNext: Christian C. Schouten
Message 2 of 5 in “Beginner's question on how to use git for multiple parallel versions”
  1. Christian C. SchoutenJan 4, 2010
  2. Bill LearJan 4, 2010
  3. Christian C. SchoutenJan 4, 2010
  4. Bill LearJan 4, 2010
  5. Dmitry PotapovJan 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.