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
相关推荐
大卫小东(Sheldon)1 小时前
GIM 2.0 发布:真正让 AI 提交消息可定制、可控、可项目级优化
git·rust·gim
知识即是力量ol3 小时前
研发实战:Git 规范化开发全流程指南
git·gitee·github
我是一只代码狗3 小时前
idea创建分支
git
知识即是力量ol5 小时前
Git 快速入门 (实习生视角)
git·gitee·github
Dontla6 小时前
Git撤销上一次提交(撤销提交,Git回退提交)git reset、git revert
git
wdfk_prog6 小时前
解决 `git cherry-pick` 引入大量新文件的问题
大数据·git·elasticsearch
fu的博客8 小时前
Git从删库到跑路
git·gitee·github
要加油哦~9 小时前
git 报错 | husky - pre-commit hook exited with code 1 解决
git
知识即是力量ol9 小时前
Git 实战指南:从分支管理到冲突解决
git·github·源代码管理
weixin_462446231 天前
Git 本地忽略 application-dev.yml 的最佳实践:不提交 .gitignore,不影响团队协作!
git