subtree出现,是为了取代submodule

http://wenku.baidu.com/link?url=ola85Z5tIXJpxCjLTk-dcO81ayXLs68_y6dsmXIa0niF8vWlnAtnEEiZTGlzCNk1G_g36UYNHUBpu9oszONFNB54LNzo3rX7W_ULJg-P-eG

Using Git subtrees to split a repository  使用git subtree来拆分一个版本库

Splitting a subfolder out into a new repository  github help上的

About Git subtree merges   github help上的

6.7 Git Tools - Subtree Merging   git的官方文档

https://stackoverflow.com/questions/2982055/detach-many-subdirectories-into-a-new-separate-git-repository

原来的目录

/apps
/AAA
/BBB
/CCC
/libs
/XXX
/YYY
/ZZZ

希望将下面的目录单独拆出来

/apps
/AAA
/libs
/XXX

git filter-branch --index-filter 'git rm --cached -qr --ignore-unmatch -- . && git reset -q $GIT_COMMIT -- apps/AAA libs/XXX' --prune-empty -- --all

git filter-branch --index-filter 'git rm --cached -qr --ignore-unmatch -- . && git reset -q $GIT_COMMIT -- UKERecognition UKERecognition.Api' --prune-empty -- --all

git filter-branch --index-filter 'git rm --cached -qr --ignore-unmatch -- . && git reset -q $GIT_COMMIT -- LISA.CMSWeb LISA.Chile LISA.CustomExternalMethod\LISA.CustomExternalMethod.Chile' --prune-empty -- --all

git subtree 拆分split repository的更多相关文章

  1. Using Git subtrees to split a repository

    https://lostechies.com/johnteague/2014/04/04/using-git-subtrees-to-split-a-repository/ We are in a p ...

  2. Git subtree和Git submodule

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

  3. 如何将硕大笨重的git仓库拆分成灵活轻巧的模块小仓库

    方法1.拆分一个子目录为独立仓库 参考链接:https://segmentfault.com/a/1190000002548731 以前是用 filter-branch 来实现,这个需求太常见了,有人 ...

  4. git 仓库拆分方案对比

    此文已由作者张磊授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 前言 git 拆分仓库在网上已有的案例上来看,分为 submodule 和 subtree. 还有基于这两个方 ...

  5. 【Git】原Git库拆分子目录作为新仓库,并保留log记录

    一.需求描述: 现有一个git仓库,Team A和Team B的人操作同一仓库的不同目录,Team A的dev希望Team B的dev没有权限review属于Team A的代码目录,故现需要先将这个g ...

  6. Git 仓库拆分

    方案对比 subtree 使用命令 git subtree split -P dirPath -b branchName 将目标文件夹的代码都保存到指定分支.试了下,该方案虽然保留了 commit,但 ...

  7. git subtree 使用

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

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

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

  9. git subtree

    语法:git subtree split -P <被裁减的目录> -b <分支> git subtree split -P SDK/CustomUI(需要裁减的) -b Cus ...

随机推荐

  1. Understanding and Analyzing Application Crash Reports

    Introduction When an application crashes, a crash report is created and stored on the device. Crash ...

  2. 梦想CAD控件安卓图层

    新建图层 CAD中我们设置好图层后除了我们平常的绘图时选择线段的颜色,线型,线宽等作用,而且我们还可以在出图时选择性显示图形,冻结图形,已达到我们想要的效果. 实现代码说明: //增加一个图层 参数为 ...

  3. scala学习(1)----map和flatMap的区别

    转载:https://www.cnblogs.com/wbh1000/p/9846401.html 两者的区别主要在于action后得到的值 例子: import org.apache.spark.{ ...

  4. zip相关知识梳理(一)

    zip相关知识梳理(一) 经过对zip文件的长时间研究,对zip文件进行相关知识进行梳理,虽然网上很多牛人对其做了相关基础解析,但是对于特殊情况没有进行说明,比如超过4G的zip文件该以什么格式进行编 ...

  5. 一只小蜜蜂(hdoj 2044,动态规划递推)

    Problem Description 有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行.请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数.其中,蜂房的结构如下所示. Input 输入数据的第一行 ...

  6. Ice Cream Tower(The 2016 ACM-ICPC Asia China-Final Contest 二分&贪心)

    题目: Mr. Panda likes ice cream very much especially the ice cream tower. An ice cream tower consists ...

  7. zabbix+docker

    由于公司线上服务器数量太少,又要用于生产,领导让上zabbix,但熟知zabbix搭建需要LAMP或者LNMP,如果和生产服务器混搭的话,不方便管理,也怕出问题,所以就先使用docker方式搭建管理. ...

  8. mysql insert一条记录后 返回创建记录主键id的方法

    mysql插入数据后返回自增ID的方法 mysql和oracle插入的时候有一个很大的区别是,oracle支持序列做id,mysql本身有一个列可以做自增长字段,mysql在插入一条数据后,如何能获得 ...

  9. swing中的按钮事件

    package pack2; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax ...

  10. 多校1010 Taotao Picks Apples

    >>点击进入原题<< 思路:题解很有意思,适合线段树进阶 #include<cstdio> #include<cmath> #include<cs ...