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

相关文章:

  • 2021-10-27
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2021-08-22
  • 2021-11-20
  • 2021-06-03
  • 2021-05-30
  • 2021-12-09
  • 2022-01-23
相关资源
相似解决方案