一般在 GitHub 或 码云 刚创建仓库第一次pull或者push的时候就会出现这个问题,两个仓库的差别非常大,所以git拒绝合并两个不相干的东西。
解决也比较简单:
在项目的目录下执行下面的语句即可
git pull
git pull origin master
git pull origin master --allow-unrelated-histories
参考资料:https://www.cnblogs.com/wurendao/p/11732876.html
版权属于:乐心湖's Blog
本文链接:https://www.xn2001.com/archives/445.html
声明:博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!