The short story is : I have created Branch A out from the Develop Branch then I created Branch B From Branch A
You are looking for git rebase --onto
, since what you want to do is basically rebase only the commits from branch B
onto develop
.
There is a very good description of rebasing in the official git documentation. See section More Interesting Rebases for an example like yours.
Your example would be solved by
git rebase --onto develop branchA branchB
.
Also see the git rebase documentation.