git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rebasing a merge
@ 2010-06-17 15:51 Jay Soffian
  2010-06-18  4:38 ` Jay Soffian
  2010-06-18  9:10 ` Peter Krefting
  0 siblings, 2 replies; 6+ messages in thread
From: Jay Soffian @ 2010-06-17 15:51 UTC (permalink / raw)
  To: git

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.

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

end of thread, other threads:[~2010-06-24 14:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-17 15:51 rebasing a merge Jay Soffian
2010-06-18  4:38 ` 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

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