# 解决git pull 报错 fatal: refusing to merge unrelated histories

**URL:** <https://www.shiqidu.com/t/topic/187>\
**Category:** 开发调优\
**Tags:** GitHub\
**Created:** [2017 年6 月 16 日 15:03 UTC](https://www.shiqidu.com/t/topic/187 "2017-06-16T15:03:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![xiangcaodashu](https://www.shiqidu.com/user_avatar/www.shiqidu.com/xiangcaodashu/32/479_2.png) [@xiangcaodashu](https://www.shiqidu.com/u/xiangcaodashu)\
发布日期： [2017 年6 月 16 日 15:03 UTC](https://www.shiqidu.com/t/topic/187/1 "2017-06-16T15:03:07Z")

</div>

在执行 `git pull origin master` 命令时，发生报错无法pull的情况。

```bash
fatal: refusing to merge unrelated histories

```

查了原因是说在git 2.9版本后，需要加上这句`--allow-unrelated-histories`。

```bash
git pull origin master --allow-unrelated-histories

```
