git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bill Lear <rael@zopyra.com>
To: "Christian C. Schouten" <info@zark3.net>
Cc: <git@vger.kernel.org>
Subject: RE: Beginner's question on how to use git for multiple parallel versions
Date: Mon, 4 Jan 2010 09:44:13 -0600	[thread overview]
Message-ID: <19266.3277.221519.791489@blake.zopyra.com> (raw)
In-Reply-To: <22D57EF90F8E4A2799F739FC14F8BA63@Duthler.local>

On Monday, January 4, 2010 at 14:35:25 (+0100) Christian C. Schouten writes:
>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?

In my example, I used branches, but did not show how to set them up.
Here is the complete example, complete with repository and branch
creation; you would start your project here:

# Set up repo and add first file to main branch:
% mkdir my_project
% cd my_project
% git init
% echo "main line process stuff" > process.bpel
% git add process.bpel
% echo "<non-version-specific table info>" > table.xml
% git add table.xml
% git commit -a -m "First commit on master branch"

# Create branch A and branch B:
% git branch A
% git branch B

# Modify file on branch A:
% git checkout A
% echo "<table A>" > table.xml
% git commit -a -m "Modify table on Branch A"

# Modify file on branch B:
% git checkout B
% echo "<table B>" > table.xml
% git commit -a -m "Modify table on Branch B"

# Now go back to master and make some changes on common file:
% git checkout master
% cat process.bpel
main line process stuff
% echo "add more process stuff" >> process.bpel
% git commit -a -m "fix process stuff on master"

# Now go to branch A and pull in the common file:
% git checkout A
% git merge master
% cat process.bpel
main line process stuff
add more process stuff

# Now go to branch B and pull in the common file:
% git checkout B
% git merge master
% cat process.bpel
main line process stuff
add more process stuff

That should be just about all you need.


Bill

  reply	other threads:[~2010-01-04 15:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04 11:29 Beginner's question on how to use git for multiple parallel versions Christian C. Schouten
2010-01-04 13:29 ` Bill Lear
2010-01-04 13:35   ` Christian C. Schouten
2010-01-04 15:44     ` Bill Lear [this message]
2010-01-04 14:35 ` Dmitry Potapov

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=19266.3277.221519.791489@blake.zopyra.com \
    --to=rael@zopyra.com \
    --cc=git@vger.kernel.org \
    --cc=info@zark3.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).