我有两个存储库:Market 和 Android。当我将 Android merge 到 Market 时,请使用以下步骤:
cd market
git remote add android ../android
git fetch android
git merge --allow-unrelated-histories android/master
但是我得到这个错误:
ei@localhost:~/market$ git merge --allow-unrelated-histories android/master error: unknown option `allow-unrelated-histories'
我的环境:Ubuntu LTS 14.04
ei@localhost:~/market$ git --version
git version 1.9.1
这个选项是从 Git merge 中删除的,还是我需要一些额外的配置?
任何帮助将不胜感激,谢谢!
最佳答案
我之前记录了如何在 Git 2.9, June 2016 中引入该选项(如 merlin2011 在 the comments 中提到的)
由于 Ubuntu LTS 14.04 带有旧的 1.9+ Git,you need to reference an up-to-date ppa :
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt install git
那个ppa (Personnal Archive Package)是git-core/+archive/ubuntu/ppa
,并将包括最新的 Git 2.11 版本。
关于android - 未知选项 `allow-unrelated-histories',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41356766/