欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

解决error: failed to push some refs to 'XXXX'

程序员文章站 2022-04-04 11:13:33
...

当我提交的时候,遇到了这个问题
解决error: failed to push some refs to 'XXXX'
我先是查看了本地库的状态

git status

解决error: failed to push some refs to 'XXXX'
本地库是没有问题的

git add --all

解决error: failed to push some refs to 'XXXX'
再次查看一下状态
解决error: failed to push some refs to 'XXXX'
准备第二次提交

git commit -m"第二次提交"

解决error: failed to push some refs to 'XXXX'
与github仓库连接
解决error: failed to push some refs to 'XXXX'

git push -u origin master

注意不用把origin打错
解决error: failed to push some refs to 'XXXX'
输入账号与密码
解决error: failed to push some refs to 'XXXX'
然后就是你的代码可以遗臭万年了