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
相关推荐
创世虚拟世界15 小时前
我做了一个 3D 虚拟世界基底,基于这个再做 3D 虚拟世界或者元宇宙,会事半功倍
javascript·人工智能·3d·gitee·虚拟现实
71777717 小时前
有没有国产 Jira?2026 年主流国产替代方案对比与 Gitee 定位解析
gitee·jira
小此方19 小时前
「插曲:Git」企业规范篇:DevOps开发模型、Git Flow五类分支设计与测试/预发布/生产环境Bug修复及Hotfix紧急发布流程
git·bug·devops
溪语流沙19 小时前
【Web全栈进阶】JWT无状态认证:签发、校验、刷新
前端·git·python·github
OsDepK21 小时前
osgit纯图形化git版本管理工具,多人开发团队协作工具,支持Mac与Windows
git
Madison-No71 天前
Git版本控制工具(一)
git
小小小米粒1 天前
重置本地git
大数据·git·elasticsearch
7177772 天前
软件成分分析工具哪个好:2026年主流SCA工具选型与Gitee生态实践指南
gitee
小白的码BUG之路2 天前
Jenkins -- 连接gitee
运维·gitee·jenkins
鶴哥只手遮天2 天前
第 8 章 工作区与检出:unpack-trees 与并行 checkout
git