From: Jay Soffian <jaysoffian@gmail.com>
To: git <git@vger.kernel.org>
Subject: Re: rebasing a merge
Date: Fri, 18 Jun 2010 00:38:16 -0400 [thread overview]
Message-ID: <AANLkTimyqTOhkeDIMLwgw3iuN0IkDDquPi1tMV5WKoNc@mail.gmail.com> (raw)
In-Reply-To: <AANLkTilY_9j2sXlplhYB4FPAIAzuPBg2UyUTEk4DaaYF@mail.gmail.com>
On Thu, Jun 17, 2010 at 11:51 AM, Jay Soffian <jaysoffian@gmail.com> wrote:
> 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
This is a bit more efficient:
mc=$(git rev-parse HEAD)
p1=$(git rev-parse origin)
p2=$(git rev-parse HEAD^2)
git merge origin || exit 0
tree=$(git log -1 HEAD --pretty=%T)
git reset --hard $(git cat-file commit $mc | sed '1,/^$/d' | git
commit-tree $tree -p $p1 -p $p2)
next prev parent reply other threads:[~2010-06-18 4:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 15:51 rebasing a merge Jay Soffian
2010-06-18 4:38 ` Jay Soffian [this message]
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=AANLkTimyqTOhkeDIMLwgw3iuN0IkDDquPi1tMV5WKoNc@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).