Git拒绝合并无关的历史。什么是'无关的历史'? [英] Git refusing to merge unrelated histories. What is 'unrelated histories'?

查看:1046
本文介绍了Git拒绝合并无关的历史。什么是'无关的历史'?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的本地,我创建了新的文本文件 - > git add newfile.txt - > commit - > pull origin master - > ERROR!



拒绝合并不相关的历史。



什么是不相关的历史? ,
什么是相关的历史记录?

解决方案

我认为你已经在远程仓库中提交了, 。

使用此命令

  git pull origin master --allow - 无关历史
git合并起源起源/主


In my local, I made new text file -> git add newfile.txt -> commit -> pull origin master -> ERROR!

"refusing to merge unrelated histories".

What is unrelated histories? , what is related histories?

解决方案

I think you have commit in remote repository and when you pull this error happen.

use this command

git pull origin master --allow-unrelated-histories
git merge origin origin/master

这篇关于Git拒绝合并无关的历史。什么是'无关的历史'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆