赞
踩
新建了一个本地仓库之后,把本地仓库和远程仓库进行关联提交、拉取的时候,
出现了如下错误:
$ git pull origin master
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 9 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (9/9), 786 bytes | 34.00 KiB/s, done.
From gitee.com:llliyuheng/1111
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
fatal: refusing to merge unrelated histories
在你的操作命令后面加 --allow-unrelated-histories
例如:
$ git merge master --allow-unrelated-histories
如果你是git pull或者git push报fatal: refusing to merge unrelated histories
同理:
git pull origin master --allow-unrelated-histories / git pull --allow-unrelated-histories
等等,就是这样完美的解决pofei!
--
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。