git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to merge branches except for one commit
@ 2008-05-29  2:32 Andrew Arnott
  2008-05-29  2:42 ` Avery Pennarun
  2008-05-29  4:24 ` Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Arnott @ 2008-05-29  2:32 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-05-29 15:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-29  2:32 How to merge branches except for one commit Andrew Arnott
2008-05-29  2:42 ` 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

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).