Git使用——问题释疑

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/feng_zhiyu/article/details/82991200

一、出现fatal: refusing to merge unrelated histories

在上传文件夹到github的操作过程中,先pull github中的仓库,因为和本地仓是两个项目,执行命令

git pull origin master

出现上面的错误

释疑

在git pull时,这句代码是在git 2.9.2版本发生的,最新的版本需要添加--allow-unrelated-histories

git pull origin master --allow-unrelated-histories

利用Git上传文件、文件夹到github或其他git服务器流程参考:利用git上传本地文件、文件夹到Github

猜你喜欢

转载自blog.csdn.net/feng_zhiyu/article/details/82991200
今日推荐