Done
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
为什么会出现这样的错误?:我是新建的项目在git上申请了一个仓库,由于第一次推送本地和远程仓库两者代码文件不同步,因此需要先pull,进行合并然后再进行push。
解决方法:
1、先使用pull命令:文章来源:https://www.toymoban.com/news/detail-511310.html
git pull --rebase origin master
2、再使用push命令:文章来源地址https://www.toymoban.com/news/detail-511310.html
git push -u origin master
到了这里,关于Git在push推送的时候报错:Donehint: not have locally. This is usually caused by another repository pushinghi的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!