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 vote
Article Rating
Subscribe
提醒
guest
1 评论
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
1
0
Would love your thoughts, please comment.x
()
x