Git: how to use rebase with theirs strategy

后端 未结 2 1737
旧巷少年郎
旧巷少年郎 2021-01-22 09:01

Basically, I just want to (re)set the parent (let\'s say to commit A) of a specific commit (commit B) which is the root commit of some branch x

2条回答
  •  误落风尘
    2021-01-22 09:48

    rebase isn't designed for what you want to do. The other poster was correct; what you want to do is set up a graft to attach B to A, then run git filter-branch to bake it into the commits. An example of this exact use case can be found in the git filter-branch manpage.

提交回复
热议问题