未知选项`allow-unrelated-history' [英] unknown option `allow-unrelated-histories'

查看:3982
本文介绍了未知选项`allow-unrelated-history'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个回购:Market和Android。当我将Android合并到Market时,请使用以下步骤:

  cd market 
git remote add android ../android
git fetch android
git merge --allow-unrelated-history android / master

但是我得到这个错误:

lockquote
ei @ localhost:〜/ market $ git merge --allow-unrelated-history
android / master错误:未知选项`allow-unrelated-history'


我的环境:Ubuntu LTS 14.04

  ei @ localhost:〜/ market $ git --version 
git版本1.9.1

这个选项是从Git合并中删除的,还是我需要一些额外的配置?



谢谢!

解决方案

我之前记录了如何在 Git 2.9,2016年6月(如 merlin2011 评论

由于Ubuntu LTS 14.04自带旧1.9+ Git,因此需要引用最新的ppa

  sudo add-apt-repository ppa:git-core / ppa 
sudo apt-get update
sudo apt install git

ppa(个人档案包) p>

I have two repos: Market and Android. When I merge Android to Market use these steps:

cd market
git remote add android ../android
git fetch android
git merge --allow-unrelated-histories android/master

But I get this error:

ei@localhost:~/market$ git merge --allow-unrelated-histories android/master error: unknown option `allow-unrelated-histories'

My enviroment: Ubuntu LTS 14.04

ei@localhost:~/market$ git --version
git version 1.9.1

Is this option removed from Git merge, or do I need some extra config?

Any help would be appreciated, thanks!

解决方案

I documented before how that option has been introduced in Git 2.9, June 2016 (as mentioned by merlin2011 in the comments)

Since Ubuntu LTS 14.04 comes with an old 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

That ppa (Personnal Archive Package) is the git-core/+archive/ubuntu/ppa, and will include the latest Git 2.11 release.

这篇关于未知选项`allow-unrelated-history'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆