Git报错-refusing to merge unrelated histories
Git 报错 to Merge
2023-09-27 14:21:28 时间
执行git pull 时报错:
出现这个问题的最主要原因还是在于本地仓库和远程仓库实际上是独立的两个仓库。假如我之前是直接clone的方式在本地建立起远程github仓库的克隆本地仓库就不会有这问题了。
可以在pull命令后紧接着使用--allow-unrelated-history选项来解决问题(该选项可以合并两个独立启动仓库的历史)。
命令:
$git pull origin master –allow-unrelated-histories
以上是将远程仓库的文件拉取到本地仓库了。
相关文章
- 028_同步本地git项目到github和码云
- Git报错Error:RPC failed; curl 18 transfer closed with outstanding read data remaining
- 常用Git命令清单(转)
- Git 下载代码提示SSL certificate problem: self signed certificate in certificate chain解决方法
- 【Linux/Git/ROS/Shell/Docker】报错问题汇总1
- git报错:Auto Merge Failed; Fix Conflicts and Then Commit
- 多人使用同一个git账号实现协同提交代码开发
- git 报错解决Validate branches Cannot Create: This merge request already exists
- 在Windows下使用Git+TortoiseGit+码云管理项目代码
- Jenkins新建项目中源码管理Repository URL使用Git报错:Failed to connect to repository : Command "git ls-remote -h......
- git review报错一例
- git拉取GitLab工程报错Repository not found
- [Jenkins]执行git push命令报错fatal: could not read Username forxxx| 配置jenkins使用ssh方式连接git
- Win10 Git闪退或打开Unity项目时出现对话框Unity Launch Error ,必须以管理身份启动 Unity Hub 才能打开项目,不能将资源拖入到 Unity。在 Win10 使用 LayaAir2 时chrome调试示例项目浏览器崩溃无任何报错信息
- git 每次push都需要输入用户和密码
- git 删除分支
- eclipse项目转移至IDEA与IDEA tomcat报错(idea自带tomcat版本太高)与war包部署到win服务器与idea提交git的总结
- Git 提交更改
- Git复习(十)之常见报错和疑问
- 深入学习:Windows下Git新手教程(下)
- 【错误记录】Git 使用报错 ( error: The branch ‘feature1‘ is not fully merged. )
- git 报错 OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
- GIT好文搜藏
- git入门:git 和 GitHub的介绍