git pull github 仓库出错fatal: refusing to merge unrelated histories

localhost:VolleyDemo xxxgit status
On branch master
nothing to commit, working tree clean
localhost:VolleyDemo xxx git pull origin master
From https://github.com/mingmingsuper/VolleyDemo
 * branch            master     -> FETCH_HEAD
fatal: refusing to merge unrelated histories

以上就是我今天在github上创建一个新的仓库发现在想把本地写好第一个Demo放上去的时候出现了很多问题,尤其是上边这个问题,经过查资料发现使用如下命令可以解决

git pull origin master –allow-unrelated-histories //记住是两条中划线在allow前

注意allow前边是两道中划线

0 0 投票数
文章评分
订阅评论
提醒
guest
1 评论
最旧
最新 最多投票
内联反馈
查看所有评论
京ICP备17066706号-1
1
0
希望看到您的想法,请您发表评论x