简体   繁体   中英

add subtree of submodule in subfolder of repository in git

The Problem

I have a git-repository "installer" and a git repository "library". I want a subfolder/tree of the library repo to be a permanently updated submodule in a subfolder of the installer.

Which should look like this: installer/installer-package/lib/stdlib where stdlib is in library/stdlib

My Question

Is that possible and if yes, how?

I have tried

...installer/installer-package/lib/ $ git submodule add -b main <url to stdlib>

Which put the root directory of the library-repo in lib

I have now found out, that this problem is currently not supported by git.

There is also this duplicate which explores the question further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM