如何解决error: failed to push some refs to ‘https://gitee.com/

587 阅读1分钟

码云上创建一个新的仓库,第一次提交的时候报错:

error: failed to push some refs to 'https://gitee.com/weishihao425/vue3-background-
management.git' hint: Updates were rejected because the remote contains work that you do hint: 
not have locally. This is usually caused by another repository pushing hint: 

解决方法:

1.git 运行 git pull --rebase 仓库名 master 把远程仓库同步到本地仓库

2.再执行 git push 就可以提交啦