解决Git中fatal: refusing to merge unrelated histories
Git的报错
在使用Git的过程中有时会出现一些问题,那么在解决了每个问题的时候,都需要去总结记录下来,下次不再犯。
一、fatal: refusing to merge unrelated histories
今天在使用Git创建项目的时候,在两个分支合并的时候,出现了下面的这个错误。
~/SpringSpace/newframe on master ⌚ 11:35:56
$ git merge origin/druid
fatal: refusing to merge unrelated histories
1
2
3
这里的问题的关键在于:fatal: refusing to merge unrelated histories
你可能会在git pull或者git push中都有可能会遇到,这是因为两个分支没有取得关系。那么怎么解决呢?
二、解决方案
在你操作命令后面加--allow-unrelated-histories
例如:
git merge master --allow-unrelated-histories
~/SpringSpace/newframe on druid ⌚ 11:36:49
$ git merge master --allow-unrelated-histories
Auto-merging .gitignore
CONFLICT (add/add): Merge conflict in .gitignore
Automatic merge failed; fix conflicts and then commit the result.
1
2
3
4
5
如果你是git pull或者git push报fatal: refusing to merge unrelated histories
同理:
git pull origin master --allow-unrelated-histories
等等,就是这样完美的解决咯!
————————————————
版权声明:本文为CSDN博主「向小凯同学学习」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wd2014610/article/details/80854807
解决Git中fatal: refusing to merge unrelated histories相关推荐
- 解决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 错误
git pull 失败 ,提示:fatal: refusing to merge unrelated histories 其实这个问题是因为 两个 根本不相干的 git 库, 一个是本地库, 一个是远 ...
- Git - git 出现 fatal: refusing to merge unrelated histories 错误
背景 git pull失败,提示:fatal: refusing to merge unrelated histories 根本原因 因为两个根本不相干的 git 库, 一个是本地库, 一个是远端库, ...
- 解决git: fatal:refusing to merge unrelated histories
** 解决Git中fatal: refusing to merge unrelated histories ** 前言 提示:这里可以添加本文要记录的大概内容: 在使用Git的过程中有时会出现一些问题 ...
- 解决Git中的fatal: refusing to merge unrelated histories
创建了一个全新的项目,在开发分支开发完成后,但是在进行Merge Request的时候出现如下问题: 要求我进行rebase,我想是因为远程项目的RELEASE(直接从master创建的分支,所有的代 ...
- Git pull 错误:fatal: refusing to merge unrelated histories解决办法
描述 在使用git pull origin master拉取github代码时,报以下错误: fatal: refusing to merge unrelated histories 解决办法 将gi ...
- Git出现 FETCH_HEAD fatal: refusing to merge unrelated histories解决方法
目录 1. 问题所示 2. 解决方法 1. 问题所示 出现如下问题: PS D:\项目\manongyanjiuseng> git pull origin master From ssh://x ...
- Git解决 fatal: refusing to merge unrelated histories
一.fatal: refusing to merge unrelated histories 新建了一个本地仓库之后,把本地仓库和远程仓库进行关联提交.拉取的时候, 出现了如下错误: $ git pu ...
最新文章
- LeetCode简单题之两个数组的交集 II
- iis占用服务器内存,W3wp.exe 进程占用内存高消耗CPU近100%导致网站反应速度缓慢的解决方案...
- 关于数据访问模式(三)—— Data Accessor模式
- SAP Spartacus OccEndpointsService getUrl方法的实现原理
- php中files和FILRS,php获取文件内容最后一行示例
- 实现背景透明的方法,兼容ie6/7/8等浏览器
- python selenium list index out of range
- 针对不同pandas版本进行列名的修改
- tensorflow学习之常用函数总结:tensorflow.argmax()函数
- 浅谈面粉厂防爆的重要性及措施(转)
- 解决XCode运行app在模拟器上,提示模拟器不存在
- 【 2015-2016 XVI Open Cup, Grand Prix of Bashkortostan, SKB Kontur Cup Stage 2】题目总结
- 问题分析与解决——ADSL错误代码(转)
- 简单线性相关系数 r及检验
- SplitContainer的使用
- Could not resolve type alias 解决方法
- typora 自动添加标题序号
- 逆向-攻防世界-logmein
- 使用Echarts在前端页面绘制地图
- tinymce 实现 粘贴图片自动上传
热门文章
- JVM可创建的最大线程数
- Apache Superset从入门到放弃(基于python3.6.9)
- Yarn资源分配示例
- redis抽奖并发_Redis优化高并发下的秒杀性能
- .net函数查询_数据分析-SQL-复杂查询
- 怎么调整字段长短_木北造型:空气刘海卷发筒怎么用 木北造型告诉您
- 用python简单处理图片(2):图像通道\几何变换\裁剪
- Android AIDL使用介绍(1)基本使用
- HBase shell 中的十六进制数值表示
- Sublime Text 3添加右键