文章目录

  • #事故现场
  • #解决方法

#事故现场

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的解决方法相关推荐

  1. git报错:‘origin’does not appear to be a git repository

    git报错:'origin'does not appear to be a git repository 原因 具体解决方法 原因 是由于git找不到远端的仓库地址了,在git文件夹下,config文 ...

  2. git报错:Pull is not possible because you have unmerged files解决方法

    在git pull的过程中,如果有冲突,那么除了冲突的文件之外,其它的文件都会做为staged区的文件保存起来. 重现: $ git pull A    Applications/Commerce/B ...

  3. git报错:LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 解决方法

    git config --global --unset http.proxy 然后再git push <你的git地址> main 接着会跳出来输入用户名和密码, 密码记得填写你的toke ...

  4. 【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的邮箱管理中,取消勾 ...

  5. python3运行报错:TypeError: Object of type ‘type‘ is not JSON serializable解决方法(详细)

    python3运行报错:TypeError: Object of type 'type' is not JSON serializable解决方法(详细) 参考文章: (1)python3运行报错:T ...

  6. nodejs连接mysql数据库,报错Client does not support authentication protocol requested by server的解决方法

    nodejs连接mysql数据库,报错Client does not support authentication protocol requested by server的解决方法 参考文章: (1 ...

  7. MyBatis多个接口参数报错:Available parameters are [0, 1, param1, param2], 及解决方法

    MyBatis多个接口参数报错:Available parameters are [0, 1, param1, param2], 及解决方法 参考文章: (1)MyBatis多个接口参数报错:Avai ...

  8. 安装thinkphp 报错Could not find package topthink/think with stability stable.的解决方法

    安装thinkphp执行命令 composer create-project topthink/think tp5 --prefer-dist 报错 [InvalidArgumentException ...

  9. 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的解决方法 问题分析 ...

最新文章

  1. 举例说明html语言的结构,HTML语言的结构
  2. 好程序员大数据独家解析-hadoop五大节点
  3. C语言实现希尔排序shell sort算法之一(附完整源码)
  4. EF 实现自定义数据库字符串
  5. 计算机输入代码0怎么能输入,电脑蓝屏0xv0000098错误代码怎么回事_电脑蓝屏0xv0000098错误代码的解决方法...
  6. SQL Server系列
  7. 对while((pid = waitpid(-1, stat, WNOHANG)) 0)不懂的地方,现在懂了
  8. NoSuchObjectException(message:ods_db.event table not found)
  9. 国二mysql综合应用题答案_2017年9月全国计算机二级MySQL考试章节练习题
  10. 自动控制原理第七版胡寿松pdf_自动控制原理简明笔记—(04)
  11. 人大经济论坛SAS入门到高级教程
  12. keil中函数变量定位方法
  13. Check Point R80.40 防火墙
  14. 2035年进入现代化交通强国行列
  15. 打造海报视觉效果—利用图层模式调色
  16. 【转】Mp4 Faq
  17. 彻底弄懂base64的编码与解码原理
  18. strlen()函数详解
  19. php和c#短信接口,C#代码示例_短信接口 | 微米-中国领先的短信彩信接口平台服务商...
  20. centos切换jdk版本

热门文章

  1. 误差函数拟合优缺点_GELU的两个初等函数近似是怎么来的?
  2. 动力锂离子电池性能及安全测试方面的国内外标准
  3. 编译linux tq2440,移植linux文件系统遇到的问题 tq2440,linuxtq2440
  4. 压力变送器和压力表有什么区别?
  5. 小学弟问:程序员的工作是不是每天都是敲一天的代码呢?
  6. STM32PWM控制智能风扇
  7. 小程序画布之CanvasContext
  8. 各种深度聚类方法摘要
  9. Linux内核中的PCB里面task_struct结构体中的具体信息
  10. 牛人翻唱曾轶可《狮子座》