我有一个功能分支说branch A
,来自 AI 已创建branch B
,后来branch C
从 B 创建。分支 B 获得了更多提交并合并到分支 A。我想在分支 A 上重新设置分支 C。
图形表示:
实际场景
我如何实现这一目标?我试过了:
git rebase A
开启时C
git rebase --onto A B C
在这两种情况下,当我尝试这样做时,git push
我都会遇到错误:
! [rejected] C -> C (non-fast-forward)<br/>
error: failed to push some refs to 'https://github.com/repo/myRepo.git'