0

I didn't find anything related so I thought I might ask. Say in a project I have the following structure:

my_project
├── .git
└── submodules
    ├── database_client
    │   └── submodules
    │       ├── io_lib
    │       │   └── .git
    │       └── JSON_parser // <--
    │           └── .git
    └─ JSON_parser // <-- one of those is not needed..
        └── .git

As you can see, the JSON_parser submodule is a dependency of both, my main project and a submodule that I'm including. So what I suppose is going to happen is that git is going to clone it twiced when using git submodule update --init --recursive. Is there a way to avoid that und only use the submodule once in my project?

glades
  • 3,778
  • 1
  • 12
  • 34
  • https://stackoverflow.com/a/4116331/7976758 , https://stackoverflow.com/a/51054855/7976758 – phd Oct 19 '22 at 14:48
  • Thank you. I see symlinks seem to be the solution. Would this also work on windows (Afaik windows doesn't know the concept of symlinks)? – glades Oct 19 '22 at 15:11
  • https://stackoverflow.com/q/5917249/7976758 , https://stackoverflow.com/a/11664406/7976758 , https://stackoverflow.com/search?q=%5Bgit%5D+symlinks+windows – phd Oct 19 '22 at 20:26

0 Answers0