赞
踩
今天在拉取远程仓库上的项目时出现了这个个问题
C:\Users\Administrator\Source\Repos\NewRepo>git pull https://github.com/houchuanhao/ACM.git master
From https://github.com/houchuanhao/ACM
错误提示如下
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
原因是在本地的文件夹为NewRepo,与远程仓库名称不一样
pull时添加 –allow-unrelated-histories
C:\Users\Administrator\Source\Repos\NewRepo>git pull origin master --allow-unrelated-histories
From github.com:houchuanhao/ACM
* branch master -> FETCH_HEAD
Merge made by the 'recursive' strategy.
README.md | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 README.md
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。