Git报错-refusing to merge unrelated histories
问题:
在本地创建一个项目关联到码云仓库关联远程地址 git remote add origin https://xxxxx
,然后报了个错 fatal: refusing to merge unrelated histories
(拒绝合并不相关的历史),
原因:
在网上查了下资料,主要原因还是在于本地仓库和远程仓库实际上是独立的两个仓库,如果是通过clone的方式拉取远程仓库的克隆本地仓库就不会有这问题了。
解决:
可以通过 git pull origin master --allow-unrelated-histories
,将远程仓库的文件拉取到本地仓库,然后再 push 到远程仓库就行了
资料来源 https://blog.csdn.net/u012145252/article/details/80628451
Git报错-refusing to merge unrelated histories相关推荐
- git报错:refusing to merge unrelated histories 的解决方法
文章目录 #事故现场 #解决方法 #事故现场 将本地代码添加到远程仓库,然后pull远程仓库代码时,报错: $ git remote add origin http://192.168.1.183/g ...
- 记Git报错-refusing to merge unrelated histories
转:https://blog.csdn.net/u012145252/article/details/80628451 环境 系统:win7 git版本: 2.16.2.windows.1 问题 1. ...
- 解决Git中fatal: refusing to merge unrelated histories
Git的报错 在使用Git的过程中有时会出现一些问题,那么在解决了每个问题的时候,都需要去总结记录下来,下次不再犯. 一.fatal: refusing to merge unrelated hist ...
- 解决Git中fatal: refusing to merge unrelated histories(亲测)
Git的报错 在使用Git的过程中有时会出现一些问题,那么在解决了每个问题的时候,都需要去总结记录下来,下次不再犯. 一.fatal: refusing to merge unrelated hist ...
- git pull fatal: refusing to merge unrelated histories
1.首先我github有个远程仓库,然后我本地有个仓库 本地仓库我新添加了一个文件,然后我去关联(git remote add origin git@github.com:qshilary/gitte ...
- Git解决 fatal: refusing to merge unrelated histories
一.fatal: refusing to merge unrelated histories 新建了一个本地仓库之后,把本地仓库和远程仓库进行关联提交.拉取的时候, 出现了如下错误: $ git pu ...
- idea使用git提交代码报异常refusing to merge unrelated histories和unknown option `allow-unrelated-histories‘
目录 一.异常refusing to merge unrelated histories 二.异常unknown option `allow-unrelated-histories' 一.异常refu ...
- idea Git Pull Failed refusing to merge unrelated histories
问题: 在idea 将本地代码添加到远程仓库,然后pull远程仓库代码时,报错: Git Pull Failed From https://gitee.com/abcd/git ...
- git 出现 fatal: refusing to merge unrelated histories 错误
git pull 失败 ,提示:fatal: refusing to merge unrelated histories 其实这个问题是因为 两个 根本不相干的 git 库, 一个是本地库, 一个是远 ...
最新文章
- 【iOS官方文档翻译】iOS的蓝牙连接、数据接收及发送
- 抛弃VS Code,我还能用啥编辑器?| 技术头条
- Opencv cv2.KalmanFilter 鼠标跟踪
- PHP jquery瀑布流特效源码
- SQL中的left outer join,inner join,right outer join用法
- NOJ---1408----map的运用
- Android Gson的使用总结
- 洛谷 P4012 深海机器人问题【费用流】
- mysql5.7 至少需要1560,mysq5.7.28配置innodb_page_size错误引起的错误1071(42000)
- 关于腾讯应用管理中心,认领应用
- 将 Java 作为入门编程语言有错吗?
- 博弈论学习笔记(六)纳什均衡之约会游戏与古诺模型
- EDU教育版Office365使用教程(一):邮箱登陆及使用
- ngx.var与ngx.ctx的区别
- 银行资产业务和负债业务
- Ubuntu16.04在4K显示器中,字体太小,进行调整
- java的setquality值多少_java使用JPEGEncodeParam类的setQuality方法进行高质量图片缩放类(转)...
- Parameter 'arg0' not found. Available parameters are [xxx, xxx, param1, param2]
- 查看交换机每个端口连接的mac从而知道连接的IP计算机
- python系列3(list tupe dict )