我有两个回购:市场和Android.当我将Android合并到Market时,请使用以下步骤:
cd market
git remote add android ../android
git fetch android
git merge --allow-unrelated-histories android/master
Run Code Online (Sandbox Code Playgroud)
但我得到这个错误:
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
Run Code Online (Sandbox Code Playgroud)
这个选项是从Git合并中删除的,还是需要一些额外的配置?
任何帮助将不胜感激,谢谢!
有没有办法让git输出显示重要单词的颜色,如"错误","警告"或"中止"?(不区分大小写).
有时候我做了一个git pull,输出是几行,我通常不会阅读所有这些,但是在最后一行,有一个单词"Aborting",这引起了我的注意.
那么是否有一种方法可以显示颜色中指示某些错误条件的单词?顺便说一句git config --global color.ui true或git config --global color.ui auto不会这样做,因为我故意在Mac和Ubuntu上创建了一些合并冲突,并且没有出现颜色输出.(我在Mac上使用最新的git,git 2.6.4,在Ubuntu上使用git 2.7.2).
当我这样做时git status,我的显示屏上会出现漂亮的漂亮颜色。
但是git push/pull/fetch只是单色无聊
我将:git config color.ui always设置为开,但是除了状态外,我什么也看不到。
我想念什么吗?
如果某件事被拒绝,我希望看到一条红色消息弹出。也许有一种方法可以将git输出包装在颜色处理器中?
https://git-scm.com/book/zh/v2/Customizing-Git-Git-Configuration似乎没有谈论推/拉
即我想在这里用红色将错误行涂成红色:
To ssh://<REPO ADDRESS>
! [rejected] develop -> develop (fetch first)
error: failed to push some refs to 'ssh://<REPO ADDRESS>'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') …Run Code Online (Sandbox Code Playgroud)