And*_*rew 8 git rebase git-remote
我试图将我的远程分支重新绑定到master上,但是我想让远程分支指向它的提交,只是基于master中的不同点.
这是我的结构:
A - B - C - D (origin/master)
\
R - S - T (origin/develop)
Run Code Online (Sandbox Code Playgroud)
我想要:
A - B - C - D (origin/master) - R - S - T (origin/develop)
Run Code Online (Sandbox Code Playgroud)
如果没有某种合并,这种变革是否可能?
Luc*_*iel 15
要查看更多关于rebase的信息,您可以查看此链接或git rebase --help在终端上写信
要解决您的问题,有一种简单的方法,请按照以下步骤操作:
git branch -D develop //this will remove your local develp repository
git fetch //update references
git checkout develop //change to develop branch, but because you deleted, this command will also download the origin/develop
git rebase -p origin/master
Run Code Online (Sandbox Code Playgroud)
在这一步你可以有一些conflits,所以解决然后git add FILES THAT HAD CONFLITS和git rebase --continue
现在检查一下钢筋是否在钢板之后工作,如果是的话
git push -f origin develop
| 归档时间: |
|
| 查看次数: |
13691 次 |
| 最近记录: |