GIT无法push

报错

To https://gitee.com/xrw0616/back-end-of-western-restaurant.git

! [rejected] wxr -> wxr (fetch first)

error: failed to push some refs to 'https://gitee.com/xrw0616/back-end-of-western-restaurant.git'

hint: Updates were rejected because the remote contains work that you do not

hint: have locally. This is usually caused by another repository pushing to

hint: the same ref. If you want to integrate the remote changes, use

hint: 'git pull' before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

bash 复制代码
cd 你的文件夹路径
git init

先把东西提交到暂存区,然后提交

bash 复制代码
git add .
git commit -m "提交信息"

我强行推送到了分支

bash 复制代码
git push origin wxr:wxr --force

**问题二:**gitee无法自动合并分支

切换到主分支

bash 复制代码
git checkout master

然后从xx分支拉取

bash 复制代码
 git pull https://gitee.com/xxx/xxx.git wxr

然后从xx分支拉取

bash 复制代码
 git pull https://gitee.com/xrw0616/back-end-of-western-restaurant.git wxr

最后强行合并

bash 复制代码
git push origin master --force
相关推荐
bukeyiwanshui2 小时前
20260518 Swift实验
git·swift
qziovv2 小时前
Git 回退场景
大数据·git·elasticsearch
来自大山深处的Doge_5 小时前
解决Git提交更新更改时出错: detected dubious ownership in repository at ...
git
嵌入式爱好者hsw7 小时前
Git 部署本地仓库
git
C137的本贾尼8 小时前
Git基本操作(三):版本回退,坐上“时光机”
git
ylifs9 小时前
目的驱动式Git用法
git
来尔君10 小时前
Git Bash 提示符简化(就是每次敲命令时上面显示的那一行信息)
git·命令行
我叫张小白。11 小时前
PyCharm 集成 Git 与 Gitee
git·pycharm·gitee
小雨青年11 小时前
Git Bisect 实战:用二分法快速找到引入 Bug 的提交
git·bug
一只大袋鼠11 小时前
Git (三):Tag 标签管理、图形工具、IDEA 集成与 GitLab 私有化部署
开发语言·git·gitlab