你是否因为想把文件push到仓库里的问题,报错。
当你输入
git push origin master --allow-unrelated-histories
后显示unknown option `allow-unrelated-histories'
原因是你这可能是因为你的 git
版本太旧,不支持 allow-unrelated-histories
选项。
你可以输入
git version
查看本地git版本
这个选项是在 Git 2.9 版本中引入的,如果你的 Git 版本低于 2.9,那么你需要升级 Git 版本才能使用这个选项。