对于git
目前在团队环境中使用它来管理我们的代码,我还很陌生。我遇到了一些变基问题,并使用
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.
我该怎么办才能消除错误?
PS:我避免--force
尽可能多地使用该选项。