【发布时间】:2013-12-26 08:37:01
【问题描述】:
我对@987654322@ 还很陌生,但目前在团队环境中使用它来管理我们的代码。我遇到了一些变基问题,我使用以下方法修复了它们:
git checkout --ours filename.txt
git add filename.txt
git rebase --continue
现在我希望推送我的更改,因此运行以下命令:
$ git push origin feature/my_feature_branch
给我以下错误:
To ssh://git@coderepo.com:7999/repo/myproject.git
! [rejected] feature/my_feature_branch -> feature/my_feature_branch (non-fast-forward)
error: failed to push some refs to 'ssh://git@coderepo.com:7999/repo/myproject.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我该怎么做才能摆脱这个错误?
注意:我尽可能避免使用--force 选项。
【问题讨论】: