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
相关推荐
曾几何时`16 小时前
Git——自用手册
git
新镜20 小时前
【git】 曾经合入的文件被删除,再次合入时,相同的文件路径并不会自动合入
git
console.log('npc')21 小时前
git commit之后,想撤销commit
git
春日见21 小时前
UniAD的逻辑,与传统自动驾驶的差异
人工智能·windows·git·机器学习·docker·容器·自动驾驶
奋斗者1号21 小时前
解决Git Push Gerrit分支失败的全流程实战
大数据·git·elasticsearch
alanesnape1 天前
在 Surface Pro X (ARM64) 上成功部署 Claude Code 的完整复盘
git·node.js·claude code部署·msys2clangarm64·美区apple id·礼品卡支付·surface pro x
SouthRosefinch1 天前
Git下载与仓库配置
git
常利兵1 天前
解锁Android的隐藏超链接:Deep Link与App Link探秘
android·gitee
ChoSeitaku1 天前
Git实战|协作开发|分支设计规范|Git实践
git·设计规范
i建模1 天前
Git升级的详细操作
git