From: "Andrew Arnott" <andrewarnott@gmail.com>
To: git@vger.kernel.org
Subject: How to merge branches except for one commit
Date: Wed, 28 May 2008 19:32:36 -0700 [thread overview]
Message-ID: <216e54900805281932v1397fd30sad91f767175ba95e@mail.gmail.com> (raw)
Hi helpful git users!
I have a pattern for work (which may be flawed--feel free to jab it)
that leads me to a difficult maintenance story:
Work on master..., tracked source code set to v1.0
Create branch v1.0.... tag v1.0.0
On master, increment version of library in source code to v2.0
More work on master...
Cherry-pick most of the commits on master to the v1.0 branch, leaving
off the commit that changed master's version number to v2.0
Tag v1.1.
Work on master continues toward v2.0...
Branch off v2.0...
(and the pattern continues, with some commits in master getting
back-ported to maintenance branches.
At some point, most or all the commits on master since branching off
v1.0 I want to include in the v1.1 release. When I want to include
all the commits from master in the v1.0 branch I just do:
git checkout v1.0
git merge master
...and life is good because gitk history makes the merge easy to see
and individual commits can be easily identified as belonging to both
master and v1.0.
But as soon as I branch off v1.0 I want my master branch to start
building as v2.0, which means the first commit after branching should
never be included in the v1.0 branch. As I understand it, that rules
out ever using "git merge". I believe the only option that leaves me
is cherry picking individual commits, which is a maintenance pain
because each commit then appears as many times as branches it belongs
to, and it's difficult given just one commit to tell which branches it
has been ported to.
Am I doing something wrong, un-knowledgeable of how to properly do
merges/cherry-picks, or is this just life as we know it?
Thanks.
--
Andrew Arnott
next reply other threads:[~2008-05-29 2:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 2:32 Andrew Arnott [this message]
2008-05-29 2:42 ` How to merge branches except for one commit Avery Pennarun
2008-05-29 3:01 ` Andrew Arnott
2008-05-29 15:13 ` Andreas Ericsson
2008-05-29 4:24 ` Junio C Hamano
2008-05-29 4:38 ` Imran M Yousuf
2008-05-29 5:42 ` Andrew Arnott
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=216e54900805281932v1397fd30sad91f767175ba95e@mail.gmail.com \
--to=andrewarnott@gmail.com \
--cc=git@vger.kernel.org \
/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).