From: skillzero@gmail.com
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: How to merge from newer branch to older branches?
Date: Wed, 22 Apr 2009 10:44:06 -0700 [thread overview]
Message-ID: <2729632a0904221044q20e6cabau7dd06b3020a8ce49@mail.gmail.com> (raw)
In-Reply-To: <7vmya946fg.fsf@gitster.siamese.dyndns.org>
Based on the help from this discussion and the rebase documenation,
what I ended up doing that seemed to require the fewest conflicts is
to use git merge-base to find the merge-base of master and 1.1 (the
oldest branch I wanted the feature) then I found the commit
immediately before the first commit on the feature branch (feature~3
in this case or commit a^). Then I rebased feature:
git rebase --onto merge-base-of-1.1-and-master feature-before-first feature
Turning this (hopefully not mangled by gmail):
future o-o-o-o-o-o-o
\ \ \
1.2 \ o-o-o \
\ \
1.1 o-o-o \
\
feature o-o-o
a b c
into this:
future o-o-o-o-o-o-o
|\ \
1.2 | \ o-o-o
| \
1.1 | o-o-o
\
feature o-o-o
a b c
I can merge 'feature' into 1.1, 1.2, etc. then theoretically, I should
be able to apply bug fixes to 'feature' later and re-merge into 1.1,
1.2, etc. to pick up just the bug fixes, right?
When I merged 'feature' into 'v1.1', it resulted in the same conflicts
I originally ran into when cherry-picking, but when I looked at it, I
realized this was because I had manually integrated some changes into
1.1 from master (I'm trying to move our tree from CVS to git so I had
to manually move in some stuff from CVS instead of doing a proper git
merge).
It seems like this merge conflict is going to cause problems if I try
to re-merge to pick up a bug fix to 'feature' in the future. Looking
at the documentation, it sounds like 'git rerere' can help by
re-applying the manual conflict resolution I did?
BTW...Is there a way to find the first commit of a branch? I had to
just look at the log manually to see what I remembered to be the first
commit.
next prev parent reply other threads:[~2009-04-22 17:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-21 19:24 How to merge from newer branch to older branches? skillzero
2009-04-21 19:36 ` Jeff King
2009-04-22 5:13 ` Junio C Hamano
2009-04-22 13:34 ` Jeff King
2009-04-22 17:44 ` skillzero [this message]
2009-04-22 20:15 ` Jeff King
2009-04-22 21:01 ` skillzero
2009-04-22 21:17 ` Jeff King
2009-04-22 4:46 ` John M. Dlugosz
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=2729632a0904221044q20e6cabau7dd06b3020a8ce49@mail.gmail.com \
--to=skillzero@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.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).