fatal:'origin' does not appear to be a git repository fatal:Could not read from remote repository
天gitlab中遇到的问题:
当 git push origin branch_name时遇到报错如下:
fatal:'origin' does not appear to be a git repository
fatal:Could not read from remote repository
原因:
本地分支和远程分支断开连接
解决方法:
cd 本地分支里
1、git branch
——*master 只显示master
然后查看是否从上游拉了
2、git remote –v
——若什么都没有,则和上游已断联系,拉不了代码也推不了代码
加关联
3、git remote add origin ssh://git@gitlab*********************************.git(地址)
然后
4、git fetch origin
——会显示下拉的branch情况
格式为From ssh://gitlab.********************************
* [new branch] XXXXX ->origin/XXXXX
再次检查远程仓库,显示对应的clone地址
git remote –v
——origin git://github.com/schacon/ticgit.git (fetch)
origin git://github.com/schacon/ticgit.git (push)
然后再查分支
git branch –a
——* mater
remotes/origin/XXXXXX **********
具体的切换分支可参考https://blog.csdn.net/tanningzhong/article/details/79724488
git 重命名仓库、修改远程仓库地址、修改仓库配置可参考:https://blog.csdn.net/u011884440/article/details/71246572
---------------------
作者:huanhuaqian
来源:CSDN
原文:https://blog.csdn.net/huanhuaqian/article/details/81986064
版权声明:本文为博主原创文章,转载请附上博文链接!
fatal:'origin' does not appear to be a git repository fatal:Could not read from remote repository的更多相关文章
- 执行git命令时出现fatal: 'origin' does not appear to be a git repository错误
在执行git pull origin master时出现: fatal: 'origin' does not appear to be a git repository fatal: Could no ...
- linux git 报错提示 fatal: 'origin' does not appear to be a git repository 解决办法
输入: git pull origin master git报错提示 fatal: 'origin' does not appear to be a git repository fatal: Cou ...
- 解决“fatal: 'origin' does not appear to be a git repository...”
当使用Git进行代码push提交时,出现报错信息“fatal: 'origin' does not appear to be a git repository...”, $ git push -u o ...
- fatal: 'origin' does not appear to be a git repository
git push时报以下错误: fatal: 'origin' does not appear to be a git repository fatal: Could not read from re ...
- 推送代码分支时出现:fatal: 'origin' does not appear to be a git repository
关于ubuntu进行提交本地分支到远程库出现问题: 解决方案: 执行如下命令: git remote add origin git@github.com:yourusername/test.git y ...
- git pull fatal: refusing to merge unrelated histories
1.首先我github有个远程仓库,然后我本地有个仓库 本地仓库我新添加了一个文件,然后我去关联(git remote add origin git@github.com:qshilary/gitte ...
- Git 提示fatal: remote origin already exists
Git 提示fatal: remote origin already exists 错误解决办法 最后找到解决办法如下: 1.先删除远程 Git 仓库 $ git remote rm origin 2 ...
- remote: Repository not found. fatal: repository 'https://github.com/***/***.git/' not found
通过命令添加新repository到git hub在执行最后一步命令(如下所示)的时候报错 git push -u origin master error:remote: Repository not ...
- 【git基础】Permission denied (publickey). fatal: Could not read from remote repository
运行以下git命令的时候出现错误 git push -u origin master error The authenticity of host 'github.com (13.250.177.22 ...
随机推荐
- 从0开始部署GPU集群-1:k8s部署生态
1 k8s:nvidia deepops 2 批处理:华为volcano 3 工作流:argo
- python使用ldap3进行接口调用
把自己使用到的ldap调用的代码分享出来,希望大家可以参考 #!/usr/bin/python # -*- coding: utf-8 -*- """ @Time : 2 ...
- 汇编写的BASE64
汇编写的BASE64 unit Base64; { procedure TForm1.Button1Click(Sender: TObject); var Source, Dest: TStream; ...
- Linux下查看目录文件数和文件大小
一.查看当前目录下文件个数 在linux下查看目录下有多少文件可以用:ls -l 命令查看,ls -lR 递归查看所有目录, 如果文件很多,则用wc命令 和 grep 命令进行过滤. wc命令显示输 ...
- Java_jdbc 基础笔记之八 数据库连接(写一个查询Student对象的方法)
public Student getStudent(String sql, Object... args) { // 查询Student对象 Student stu = null; Connectio ...
- MySql通过数据库文件恢复数据库
以表”Table”为例: 如类型是MyISAM, 数据文件则以”Table.frm””Table.MYD””Table.MYI””三个文件存储于”/data/$databasename/”目录中. 如 ...
- Centos7搭建FTP服务详细过程
Centos7搭建FTP服务详细过程https://blog.csdn.net/sinat_30802291/article/details/81706152
- 【转】23 个安卓重难点突破,带你吃透 Service 知识点「长达 1W+ 字」
前言 学 Android 有一段时间了,想必不少人也和我一样,平时经常东学西凑,感觉知识点有些凌乱难成体系.所以趁着这几天忙里偷闲,把学的东西归纳下,捋捋思路. 这篇文章主要针对 Service 相关 ...
- Puppeteer最大化显示,分辨率自适应
Puppeteer自适应分辨率,可以将defaultViewport设为null, 启动的时候还是半屏显示,点击最大化按钮,可以最大化显示. 这样分辨率能够自适应操作系统. 具体可看:https:// ...
- Shell中的通配符
shell常见的通配符,注意与正则稍有不同: 字符 含义 实例 * 匹配0个或多个任意字符 a*b,a与b之间可以有任意长度的字符,也可以没有. 例如:aabcb,ab,azxcb... ? 匹配一个 ...