git使用报错: fatal: Couldn't find remote ref master的解决方法

fatal: Couldn't find remote ref master 翻译过来就是:致命的:无法找到远程参考主,也就是报错的意思。错误的提示内容意思是找不到需要连接的对象。

解决方法有以下几种:

0.如果是新建的仓库( repositories )的话在pull代码的时候,出现这个提示,可以忽略不计,直接提交就可以。

1.检查本地GIT的配置

git config user.name/git config --global user.name

git config user.email/git config --gloabl user.email

使用以上命令来检查本地的用户名和邮箱是否填写正确

2.检查远程仓库配置

git remote -v

如果远程仓库信息有误,则删除本地仓库配置,并且设置相关地址

git remote rm origin
git remote add origin XXXX

3.还是不行的话可以找到文件路径下 git文件所在,打开config文件,删除[remote "origin"] 下信息。重复1,2步骤。

   
   
   

友情链接:

技术博客

posted @ 2018-02-07 11:37  抠得儿  阅读(101669)  评论(0编辑  收藏  举报