为什么'git subtree`不工作,即使我在Ubuntu 12.10上安装了git 1.8.3.2? [英] Why is the `git subtree` not working even though I have git 1.8.3.2 installed on Ubuntu 12.10?

查看:310
本文介绍了为什么'git subtree`不工作,即使我在Ubuntu 12.10上安装了git 1.8.3.2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我即将把我的基于AngularJS的静态网站与Yeoman一起部署为Github页面。部署指令的第3步告诉我要做:

git subtree push --prefix dist origin gh-pages



但是当我输入时,我得到



git:'subtree'不是git命令。参见'git --help'。



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

运行这些命令后,我做了 git - 版本来确保我有最新版本,显然我做过,因为 git version 1.8.3.2 是输出。现在,当我尝试运行时,你可以使用

git subtree push --prefix dist origin gh-pages



我仍然遇到以下错误:
$ b $ g $:'subtree'不是git命令。请参阅'git --help'。



最后我刚刚重新启动了Ubuntu 12.10并尝试再次运行该命令,但是又一次,同样的错误。

即使已升级到当前稳定版, git子树命令仍无法正常工作release?

解决方案

它似乎并未被默认包安装。这个网站有一些方向: http://engineeredweb.com/blog/how-to-install-git-子树


I am about to deploy my AngularJS based static site as a Github Page with Yeoman. Step 3 of the deployment instructions tell me to do

git subtree push --prefix dist origin gh-pages

but when I enter that I get

git: 'subtree' is not a git command. See 'git --help'.

This SO answer provided me instructions on how to upgrade to the latest git-core and ensure it always get upgraded to the latest stable release.

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

After running those commands I did git --version to make sure I had the latest version and apparently I did since git version 1.8.3.2 was the output. Now when I tried running

git subtree push --prefix dist origin gh-pages

again I still got the same following error

git: 'subtree' is not a git command. See 'git --help'.

Finally I just restarted Ubuntu 12.10 and tried to run the command again but once again, I got the same error.

How come the git subtree command is still not working even though I have upgraded to the current stable release?

解决方案

It doesn't seem to be installed by the default package. This site has some directions: http://engineeredweb.com/blog/how-to-install-git-subtree

这篇关于为什么'git subtree`不工作,即使我在Ubuntu 12.10上安装了git 1.8.3.2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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