From: Jay Soffian <jaysoffian@gmail.com>
To: git <git@vger.kernel.org>
Subject: rebasing a merge
Date: Thu, 17 Jun 2010 11:51:03 -0400 [thread overview]
Message-ID: <AANLkTilY_9j2sXlplhYB4FPAIAzuPBg2UyUTEk4DaaYF@mail.gmail.com> (raw)
Say you have:
-o--o--o--m master
/
--o--o--o side
You're ready to push the merge, but in the mean time:
o--o--o origin/master
/
-o--o--o--m master
/
--o--o--o side
For various reasons, when this happens I want to rebase my merge (m).
It is almost always a merge that involves a fair amount of conflict
resolution. Here's how I've been doing it, but I'll bet there's a less
convoluted way:
git merge origin/master # resolve as needed
git branch -f temp # save the tree
git reset --hard ORIG_HEAD # restore back to the merge
git rebase -i -p --onto origin/master HEAD~1 # rebase the merge
git checkout temp -- . # resolve the conflict here
git rebase --continue # commit the resolution
git diff temp # no differences
git branch -D temp
Thoughts?
j.
next reply other threads:[~2010-06-17 15:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 15:51 Jay Soffian [this message]
2010-06-18 4:38 ` rebasing a merge Jay Soffian
2010-06-18 9:10 ` Peter Krefting
2010-06-18 15:19 ` Jay Soffian
2010-06-24 9:16 ` Peter Krefting
2010-06-24 14:22 ` Jay Soffian
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=AANLkTilY_9j2sXlplhYB4FPAIAzuPBg2UyUTEk4DaaYF@mail.gmail.com \
--to=jaysoffian@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).