Jeff Sheltren: git rebase --onto - The Simple One-Minute Explanation

News - NETCreator - 2018-04-17 15:30:51

TL;DR the command you want is: git rebase --onto [the new HEAD base] [the old head base - check git log] [the-branch-to-rebase-from-one-base-to-another] And my main motivation to putting it here is to easily find it again in the future as I always forget the syntax. (This is a re-post from my old blog on drupalgardens, but it is still helpful.) Mental model To make all of this simpler think of: You have: Two red dishes on top of two blue dishes One yellow dish You want: Those two red dishes on top of the one yellow dish You do: Carefully go with the finger down to the bottom of the two red dishes, which is the first blue dish Take the two red dishes Transfer them over to the one yellow dish That is what rebase --onto does: git rebase --onto [yellow dish] [from: first blue dish] [the two red dishes] Note: The following is meant for an intermediate audience that is familiar with general rebasing in GIT Longer explanation It happened! A branch - you had based your work - on has diverged upstream, but you still have work in progress, which you want to preserve. So it looks...
fabian Tue, 04/17/2018 - 02:24
Source: Fedora
Latest Posts
NETCreator CMS

Search
Free Hosting