Home > Enterprise >  add subtree of submodule in subfolder of repository in git
add subtree of submodule in subfolder of repository in git

Time:06-01

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

CodePudding user response:

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

There is also this duplicate which explores the question further.

  •  Tags:  
  • git
  • Related