Is it possible to maintain a git submodule under multiple paths?

19 Views Asked by At

I have a .gitmodules file with something similar to this:

[submodule "my_submodule"]
    path   = vendor/my_submodule
    url    = # whatever
    branch = # whatever

Because of repo's structure refactoring reasons, I need to keep temporarily this module in that path but also in another one, say, modules/my_submodule.

Is it possible to maintain the submodule in two different paths at the same time? Something like this:

[submodule "my_submodule"]
    path   = ["vendor/my_submodule", "modules/my_submodule"] 
    url    = # whatever
    branch = # whatever
0

There are 0 best solutions below