【发布时间】:2015-10-01 19:01:42
【问题描述】:
所以我针对 master 重新设置了一个分支。不过,
git push --set-upstream origin MyBranch
我明白了
! [rejected] MyBranch -> MyBranch (non-fast-forward)
error: failed to push some refs to 'https://mygit@bitbucket.org/mygit/myproject.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
所以,好的。再次重新定位。顺利完成。那么
git pull
* branch HEAD -> FETCH_HEAD
好的,已经更新了
git push --set-upstream origin MyBranch
再次,错误。我可以强制推动,但我不喜欢丢失东西的风险,老实说,我真的很想知道一个适当的解决方案来解决这个恼人的问题,即使我按照规则手册玩,似乎也会发生这种问题。
【问题讨论】:
-
你rebase的分支已经推送了吗?
-
做
git fetch和git rebase origin/MyBranch
标签: git fast-forward