The short story is : I have created Branch A out from the Develop Branch then I created Branch B From Branch A
Let's say that your current branch diagram looks something like this:
develop: A -- B
\
branchA: C -- D -- E
\
branchB: F -- G
You want the B branch to look like this:
develop: A -- B
\
branchB: F -- G
Rebase onto can be used here:
git rebase --onto B E
In plain English terms, the above command says to place the commit whose parent is E
, which is the F
commit (and the start of the B branch) onto a new base which is commit B
in the develop
branch.