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

来源:互联网 发布:linux hexo github 编辑:程序博客网 时间:2024/06/08 00:14

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

[plain] view plain copyuser ~/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就可以了,或者用下面的模板:

[plain] view plain copy[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  

把其中换成你项目的地址就可以了:

[plain] view plain copyurl = https://github.com/CrossLee/xxx.git  pushurl = https://github.com/CrossLee/xxx.git  

转载自:http://blog.csdn.net/withiter/article/details/14107165

阅读全文
0 0
原创粉丝点击