Given the following branches
A---B---C topic (HEAD)
/
D---E---F---G master
and running the command
git rebase master
Does that mean, that we are
topic/HEAD
on master
, or...master
with topic/HEAD
?I can't infer how I would express this action in a sentence from the git-rebase
man pages.
PS: I know what rebase
is and what it does, I just want to know "how to speak" the command, since the first argument is actually called upstream
.
The resultant branch layout would be as follows:
A---B---C ("dangling", waiting for garbage collection)
/
D---E---F---G---A'---B'---C' < topic (HEAD)
^
master
You would be rebasing your topic
(current) branch with master
, thus changing the ancestry of A (now A' since it's not quite the same commit) from E to G.
The first, rebasing topic/HEAD on master.
You're taking all the commits up to and including the latest of master. The current state/the latest commit of master is now again the 'base' on which you based your work.
You rebased that work on (the work already done in) master.
And (copies of) your commits will be added at the end, after the last commit in master. Credits to Makoto for supplying the graphic that explains the above.
For more reference materials, I personally think this tutorial by Atlassian explains it really nicely, including similar graphics. The basic rebasing is a 2 minute read, after which it continues with interactive rebasing, which is a really, really nice feature to have in your toolkit!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With