一、第一方法

git clone https://github.com/git/git.git

cd git/contrib/subtree

sudo make prefix=/usr
sudo make prefix=/usr install
sudo make prefix=/usr install-doc Then command git subtree should be available.

二、第二种方法

git clone https://github.com/git/git.git

cd contrib/subtree

cp git/contrib/subtree/git-subtree /usr/local/
ln -s /usr/local/git-subtree /usr/bin/git-substree

三、检查git版本,老版本git不支持,需要升级git

解决git: 'subtree' is not a git command. See 'git --help'.的更多相关文章

  1. git subtree有效管理公共第三方lib

    如果你的项目中有很多第三方的lib,你希望使用它,并且也希望可能对该lib做修改并且贡献到原始的项目中去,或者你的项目希望模块化,分为几个repo单独维护,那么git subtree就是一个选择.gi ...

  2. git subtree pull 错误 Working tree has modifications

    git subtree 是不错的东西,用于 git 管理子项目. 本文记录我遇到问题和翻译网上的答案. 当我开始 pull 的时候,使用下面的代码 git subtree pull --prefix= ...

  3. git subtree:无缝管理通用子项目

    移动互联网的爆发以及响应式页面的尴尬症,开发web和mobile项目成为了标配,当然实际情况下,会有更多的项目. 多项目开发对于前端来说是个很大的挑战✦ 重复,重复的前端架构,重复的前端依赖,重复的工 ...

  4. 指定文件夹 指定文件后缀名 删除整个文件夹 git 冲突解决 create a new repository on the command line push an existing repository from the command line

    http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001375840038939c2 ...

  5. git subtree 使用

    这个是备忘录.原网页(https://medium.com/@porteneuve/mastering-git-subtrees-943d29a798ec , http://cncc.bingj.co ...

  6. Git subtree和Git submodule

    git submodule允许其他的仓库指定以一个commit嵌入仓库的子目录. git subtree替代git submodule命令,合并子仓库到项目中的子目录.不用像submodule那样每次 ...

  7. 【Devops】【docker】【CI/CD】Jenkins源代码管理 添加gitlab项目地址,报错Failed to connect to repository : Error performing command: ls-remote -h git@192.168.92.130:8090/root/swapping.git HEAD

    Jenkins源代码管理 添加gitlab项目地址 报错如下: Failed to connect to repository : Error performing command: ls-remot ...

  8. 使用GIT SUBTREE集成项目到子目录(转)

    原文:http://aoxuis.me/post/2013-08-06-git-subtree 使用场景 例如,在项目Game中有一个子目录AI.Game和AI分别是一个独立的git项目,可以分开维护 ...

  9. Git应用详解第十讲:Git子库:submodule与subtree.md

    前言 前情提要:Git应用详解第九讲:Git cherry-pick与Git rebase 一个中大型项目往往会依赖几个模块,git提供了子库的概念.可以将这些子模块存放在不同的仓库中,通过submo ...

随机推荐

  1. JDK源码分析(5)Vector

    JDK版本 Vector简介 /** * The {@code Vector} class implements a growable array of * objects. Like an arra ...

  2. Python文件和异常

    程序和运行时数据是在内存中驻留的,涉及到数据交换的地方,通常是磁盘.网络等,因此需要IO接口. IO编程中,Stream(流)是一个很重要的概念,可以把流想象成一个水管,数据就是水管里的水,但是只能单 ...

  3. javascript:window.location.replace 与 window.location.reload() 刷新页面的不同效果

    今天早上我发现一个问题,当一个网页的地址最后面是一个#时(比如:http://www.baidu.com/go.asp#), 执行:window.location.replace(window.loc ...

  4. JDBC详解(二)

    一:Statement与PreparedStatement的注意点 存在sql注入的危险,如果用户传入的id为“2 or 1=1”,将删除表中的所有数据.而PreparedStatement有效的防止 ...

  5. 有趣的electron(一)

    跟我一起实现一个基于electron的hello-world吧- Come with me to implement an electron-based project hello-world. 先看 ...

  6. react中多语言切换的实现方式

    目前正在进行的项目就是一个多语言切换的项目,有些前情知识我们可以 从https://react.i18next.com/getting-started进行了解. 说到使用方法,当然首先是要$ npm ...

  7. The 2016 ACM-ICPC Asia Beijing Regional Contest E - What a Ridiculous Election

    https://vjudge.net/contest/259447#problem/E bfs,k个限制条件以数组的额外k维呈现. #include <bits/stdc++.h> usi ...

  8. 反射attr以及模块动态导入

    一.实现自省的四个函数 1.hasattr判断一个对象中有没有一个name字符串对应的方法或属性 class BlackMedium: feture="Ugly" def __in ...

  9. MySQL中的编码问题

    1.查看MySQL数据库的默认编码 (1).使用status命令 mysql> status -------------- mysql Ver 14.14 Distrib 5.5.28, for ...

  10. javascript 字符串的连接和截取

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...