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
相关推荐
noravinsc6 小时前
关于Git Flow
git
蜜獾云6 小时前
在Git中配置用户名和密码
git
scx_link8 小时前
通过git bash在本地创建分支,并推送到远程仓库中
开发语言·git·bash
南大白9 小时前
IntelliJ IDEA 运行时的 JVM 本地内存溢出崩溃
git
码农小旋风10 小时前
Claude Code 基础用法大全:对话、分析、修改、测试、Git 和工作流
人工智能·git·chatgpt·claude
南大白11 小时前
Git 撤回提交完整方案
git
像风一样的男人@11 小时前
python --实现代理服务器
git·ui
sbjdhjd12 小时前
从零搭建企业级 CI/CD(下):Jenkins+GitLab+Harbor 全链路实战指南
git·servlet·ci/cd·云原生·云计算·gitlab·jenkins
码云数智-大飞12 小时前
Go Channel 详解:并发通信的正确姿势
前端·数据库·git
OsDepK21 小时前
OSMDE手机AI编程,一键Git
git·ai编程