git rebase question
I am trying to understand the different aspects of git rebase, especially
the "--onto" option. So I was going through "git help rebase".
That made me consider a few other scenarios.
1. The first example is "git rebase master" or "git rebase master topic"
But if we want to use "--onto" option, this would become
git rebase --onto master E topic
git checkout topic
git rebase --onto master E
Where E is ether the commit hash of E, HEAD~3, master~3 or any other tag/branch
attribute of E in case there are any.
Is it correct?
2. In the same example, when we do
git rebase --onto F E topic
Does the output become the following?
3. In the same example, suppose we do
git rebase --onto master B topic
The output will become
Is it like cherry picking just C
git cherry-pick C
Could anyone verify these answers?
Thanks and Regards