iis服务器助手广告
返回顶部
首页 > 资讯 > 服务器 >详解git无法pull仓库refusing to merge unrelated histories
  • 586
分享到

详解git无法pull仓库refusing to merge unrelated histories

详解仓库pull 2022-06-04 21:06:51 586人浏览 安东尼
摘要

详解git无法pull仓库refusing to merge unrelated histories 本文讲的是把git在最新2.9.2,合并pull两个不同的项目,出现的问题如何去解决 fatal: re

详解git无法pull仓库refusing to merge unrelated histories

本文讲的是把git在最新2.9.2,合并pull两个不同的项目,出现的问题如何去解决

fatal: refusing to merge unrelated histories

我在GitHub新建一个仓库,写了License,然后把本地一个写了很久仓库上传。

先pull,因为两个仓库不同,发现refusing to merge unrelated histories,无法pull

因为他们是两个不同的项目,要把两个不同的项目合并,git需要添加一句代码,在git pull,这句代码是在git 2.9.2版本发生的,最新的版本需要添加--allow-unrelated-histories

假如我们的源是origin,分支是master,那么我们 需要这样写git pull origin master ----allow-unrelated-histories需要知道,我们的源可以是本地的路径

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

--结束END--

本文标题: 详解git无法pull仓库refusing to merge unrelated histories

本文链接: https://www.lsjlt.com/news/18685.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • git无法pull仓库refusing to merge unrelated histories怎么办
    小编给大家分享一下git无法pull仓库refusing to merge unrelated histories怎么办,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!详解git无法pull仓库refusing to mer...
    99+
    2023-06-09
  • git无法读取远程仓库怎么解决
    如果你无法读取远程仓库,可以尝试以下几种解决方法: 确认远程仓库的URL是否正确:可以使用git remote -v命令查看远程...
    99+
    2023-10-20
    git
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作