报错
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