git报错:‘origin‘does not appear to be a git repository的解决方法
文章目录
- #事故现场
- #解决方法
#事故现场
git push origin master时报错:
fatal: 'origin' does not appear to be a git repository
#解决方法
使用git remote -v
命令,什么都没有输出;
说明和远程已失去联系,这种情况可能是远程仓库已改名,或者是git remote add时操作没有将相关配置加上(或者有异常);
第一种可能可以排除,那就是第二种可能了。
和其他git项目对比了一下.git/config文件,发现了问题所在,这个git仓库只有[core]节点,没有[remote “origin”]和[branch “master”]节点信息。
[core]repositoryformatversion = 0filemode = truebare = falselogallrefupdates = true
也就是说当你git push origin master
的时候,git需要去config中查找你提交的分支信息,但是config中又是空的,所以返回上述错误。
所以解决方法就是把信息直接填上:
[core]repositoryformatversion = 0filemode = falsebare = falselogallrefupdates = truesymlinks = falseignorecase = true
[remote "origin"]url = http://192.168.1.183/git/RCTools.gitfetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]remote = originmerge = refs/heads/master
git报错:‘origin‘does not appear to be a git repository的解决方法相关推荐
- git报错:‘origin’does not appear to be a git repository
git报错:'origin'does not appear to be a git repository 原因 具体解决方法 原因 是由于git找不到远端的仓库地址了,在git文件夹下,config文 ...
- git报错:Pull is not possible because you have unmerged files解决方法
在git pull的过程中,如果有冲突,那么除了冲突的文件之外,其它的文件都会做为staged区的文件保存起来. 重现: $ git pull A Applications/Commerce/B ...
- git报错:LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 解决方法
git config --global --unset http.proxy 然后再git push <你的git地址> main 接着会跳出来输入用户名和密码, 密码记得填写你的toke ...
- 【Git】Git commit至Gitee报错‘remote: error: hook declined to update refs/heads/master‘的解决方法
Git commit至Gitee报错'remote: error: hook declined to update refs/heads/master'的解决方法 进入到Gitee的邮箱管理中,取消勾 ...
- python3运行报错:TypeError: Object of type ‘type‘ is not JSON serializable解决方法(详细)
python3运行报错:TypeError: Object of type 'type' is not JSON serializable解决方法(详细) 参考文章: (1)python3运行报错:T ...
- nodejs连接mysql数据库,报错Client does not support authentication protocol requested by server的解决方法
nodejs连接mysql数据库,报错Client does not support authentication protocol requested by server的解决方法 参考文章: (1 ...
- MyBatis多个接口参数报错:Available parameters are [0, 1, param1, param2], 及解决方法
MyBatis多个接口参数报错:Available parameters are [0, 1, param1, param2], 及解决方法 参考文章: (1)MyBatis多个接口参数报错:Avai ...
- 安装thinkphp 报错Could not find package topthink/think with stability stable.的解决方法
安装thinkphp执行命令 composer create-project topthink/think tp5 --prefer-dist 报错 [InvalidArgumentException ...
- MySQL无法启用/etc/my.cnf配置文件,重启报错Warning: World-writable config file ‘/etc/my.cnf’ is ignored的解决方法
MySQL无法启用/etc/my.cnf配置文件,重启报错Warning: World-writable config file '/etc/my.cnf' is ignored的解决方法 问题分析 ...
最新文章
- 举例说明html语言的结构,HTML语言的结构
- 好程序员大数据独家解析-hadoop五大节点
- C语言实现希尔排序shell sort算法之一(附完整源码)
- EF 实现自定义数据库字符串
- 计算机输入代码0怎么能输入,电脑蓝屏0xv0000098错误代码怎么回事_电脑蓝屏0xv0000098错误代码的解决方法...
- SQL Server系列
- 对while((pid = waitpid(-1, stat, WNOHANG)) 0)不懂的地方,现在懂了
- NoSuchObjectException(message:ods_db.event table not found)
- 国二mysql综合应用题答案_2017年9月全国计算机二级MySQL考试章节练习题
- 自动控制原理第七版胡寿松pdf_自动控制原理简明笔记—(04)
- 人大经济论坛SAS入门到高级教程
- keil中函数变量定位方法
- Check Point R80.40 防火墙
- 2035年进入现代化交通强国行列
- 打造海报视觉效果—利用图层模式调色
- 【转】Mp4 Faq
- 彻底弄懂base64的编码与解码原理
- strlen()函数详解
- php和c#短信接口,C#代码示例_短信接口 | 微米-中国领先的短信彩信接口平台服务商...
- centos切换jdk版本