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的解决方法 问题分析 ...
最新文章
- 独家 | 一文为你解析神经网络(附实例、公式)
- mysql更新一个表里的字段等于另一个表某字段的值
- [Android1.5]DigitalClock自定义日期输出格式
- python 九宫重排_[蓝桥杯][历届试题]九宫重排 (Python代码)(bfs+集合)
- Java线程安全StampedLock
- 【CodeForces - 260A】Adding Digits (思维构造)
- python 抽样函数_python中resample函数实现重采样和降采样代码
- AMD平台下在Windows虚拟机中安装Mac10.8.3的注意事项
- 感觉自己不适合编程 确学了计算机专业,高薪程序员:“我劝他学医,别学计算机,却被冤枉在害人”...
- 企业API接口设计之token、timestamp、sign具体实现
- php生成xml报错101,php编译报错大全
- c语言程序设计实验总结范文,《c语言程序设计》课程实验报告模板.doc
- php 数值转时间格式,php数值转换时间及时间转换数值用法示例
- 无源码程序反编译修改文字
- html学习(06)-网页制作【学成在线】
- vb.net操作数据库之ACCESS(2)
- Python数据分析(1)----餐饮订单数据分析
- MBT-模型驱动测试的探索与实践(一)
- python爬虫相关坑坑洼洼
- 红米3s进不了recovery_红米3s卡刷教程_红米3s用recovery刷第三方系统包
热门文章
- 2021-08-13 【翻译】Mel Frequency Cepstral Coefficient (MFCC) tutorial
- 施乐700i装服务器系统,施乐700i服务器连接不到主机
- java自定义异常并处理异常
- 【深度学习】李宏毅深度学习笔记
- headroom.js使用
- 国外2G容量免费网盘--ZumoDrive
- dio设置自定义post请求_flutter中dio的post请求方式使用总结
- java做qq登录页面
- 相机内存卡删除了还能恢复吗 相机数据清除了怎么恢复原状
- Adobe Premiere Pro 2020 入门教程(十二)视频特效