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
相关推荐
lbb 小魔仙21 分钟前
Git + Python 项目工作流最佳实践:pre-commit、CI、CHANGELOG 自动化
git·python·ci/cd
Xu_youyaxianshen4 小时前
Git 零基础常用指令手册(Gitee / GitHub 通用 )
git·gitee·github
John_ToDebug5 小时前
Git Stash 完全指南:临时保存工作区的艺术
人工智能·git·agent
是宇写的啊18 小时前
Git远程操作
git
our_times1 天前
# Git 高频命令实战指南:从日常开发到进阶协作
git
PBitW1 天前
git 中容易遗忘的点 (二) ⚡⚡⚡
前端·git·面试
PBitW1 天前
git 中容易遗忘的点 (三) 🚀🚀🚀
前端·git·面试
郑州光合科技余经理1 天前
家政预约小程序后端源码深度剖析:支付回调实战
java·开发语言·前端·git·小程序·架构·php
北极糊的狐1 天前
钉钉小程序 Git 版本管理完整流程
git·小程序·钉钉
Fzuim2 天前
当 AI 也成为提交者:ThinkFlow 的 Git 提交规范,是怎么定的
git·agent·thinkflow