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
相关推荐
春日见9 小时前
如何创建一个PR
运维·开发语言·windows·git·docker·容器
stevenzqzq1 天前
git 常用操作
大数据·git
Curvatureflight1 天前
Git工作流最佳实践:从混乱到优雅
git
wu~9701 天前
GitHub永不遗忘,使用git push -f来覆盖的提交依旧保留
git·github
Vermouth_001 天前
git clone的时候提示access denied
git
qq_437657271 天前
清楚本地的git并重新登录
git
jiang_changsheng1 天前
工作流agent汇总分析 2
java·人工智能·git·python·机器学习·github·语音识别
梦梦代码精1 天前
Gitee 年度人工智能竞赛开源项目评选揭晓!!!
开发语言·数据库·人工智能·架构·gitee·前端框架·开源
TheNextByte11 天前
如何在PC和Android平板之间传输文件
android·gitee·电脑
顶点多余1 天前
版本控制器-git
linux·git