Git推被拒绝"非快进"

 书友33947127 发布于 2023-02-12 09:00

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

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有