首页 > Web开发 > 详细

解决fatal: No remote repository specified. Please, specify either a URL...

时间:2019-06-29 22:47:13      阅读:305      评论:0      收藏:0      [点我收藏+]

今天在电脑上用git pull命令来更新本地项目,突然发现出现如标题的错误:

user ~/c/quhao$git pull
fatal: No remote repository specified. Please, specify either a URL or a
remote name from which new revisions should be fetched.
出现这个问题的原因是.git/config的配置出问题了。
解决方法是从其他项目里拷贝一份config过来,再改一下里面的url就可以了,或者用下面的模板:

 

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
url = https://github.com/CrossLee/xxx.git
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = https://github.com/CrossLee/xxx.git
[branch "master"]
remote = origin
merge = refs/heads/master
把其中换成你项目的地址就可以了:
url = https://github.com/CrossLee/xxx.git
pushurl = https://github.com/CrossLee/xxx.git
---------------------
作者:取号啦李刚
来源:CSDN
原文:https://blog.csdn.net/withiter/article/details/14107165
版权声明:本文为博主原创文章,转载请附上博文链接!

解决fatal: No remote repository specified. Please, specify either a URL...

原文:https://www.cnblogs.com/shaozhu520/p/11108120.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!