rebasing a merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]