GitHub仓库初始化后无法push

有时候你GitHub仓库初始化时候带了Readme或其他文件,推送之前需要先git pull 拉下来,会报“ * branch master -> FETCH_HEAD fatal: 拒绝合并无关的历史”的错误,解决方法是在git pull时加上–allow-unrelated-histories,如下:
git pull origin master --allow-unrelated-histories
版权声明:
作者:东明兄
链接:https://blog.crazyming.com/note/2493/
来源:CrazyMing
文章版权归作者所有,未经允许请勿转载。


共有 0 条评论