首页 > 其他 > 详细

解决git报错refusing to merge unrelated histories

时间:2021-05-08 11:47:48      阅读:15      评论:0      收藏:0      [点我收藏+]
PS C:\ycm\test\ts-newProjet> git pull origin master
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories

 在新建项目时报refusing to merge unrelated histories错误,解决方案是:在pull命令后紧接着使用--allow-unrelated-history选项。

原因:出现这个问题的最主要原因还是在于本地仓库和远程仓库实际上是独立的两个仓库。假如我之前是直接clone的方式在本地建立起远程github仓库的克隆本地仓库就不会有这问题了。

 

解决git报错refusing to merge unrelated histories

原文:https://www.cnblogs.com/cjr001/p/14743785.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!