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
相关推荐
无限进步_17 分钟前
【C++】电话号码的字母组合:从有限处理到通用解法
开发语言·c++·ide·windows·git·github·visual studio
C++ 老炮儿的技术栈1 小时前
GCC编译时无法向/tmp 目录写入临时汇编文件,因为设备空间不足,解决
linux·运维·开发语言·汇编·c++·git·qt
英俊潇洒美少年1 小时前
Git 常用命令速查表(前端开发专属版)
git
华科大胡子5 小时前
Git二分法定位Bug
git
m0_579146656 小时前
Git暂存区操作与版本回退
git
观无7 小时前
Windows 本地电脑搭建一个私有的、类似 Gitee 的 Git 服务
gitee·jenkins·.netcore
三毛的二哥7 小时前
git:git worktree多任务并行开发
git
Yiyi_Coding7 小时前
Git 版本管理重要撤回操作
git
a里啊里啊7 小时前
Git常问面试题
git
达子6667 小时前
Git中文文件名乱码显示SHA-1 哈希值
git·算法·哈希算法