我是一个相当新的人,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
尽量避免使用该选项.