git change the parent branch

前端 未结 2 672
孤独总比滥情好
孤独总比滥情好 2021-01-28 12:16

The short story is : I have created Branch A out from the Develop Branch then I created Branch B From Branch A

2条回答
  •  悲哀的现实
    2021-01-28 13:13

    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.

提交回复
热议问题