Git: Rebase Terminology
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!
I just want to know "how to speak" the command, since the first argument is actually called upstream.
I always mentally read that git rebase master
command as:
rebase the current branch on top of master (the upstream branch)
That is: replay all commit from master
(excluded) up to the current branch HEAD on top of master.
Check out also "git rebase, keeping track of 'local' and 'remote'"