Sublime Forum

Is it possible to have submodules deep in subfolders?

#1

Good day! :cowboy_hat_face:

Is there a way to maintain submodules deep down in the tree? And not in the top folder?
I found this question:


Apologies for creating similar topic, but this was 2 years ago, maybe something changed in that time…
And my question is not only “Can I do it with SM interface?”
It is also “Can I init that with custom git commands, or copy-rename-edit, or something, and then maintain it with SM?”

And can I clone projects that already contain submodules deep in the tree?

0 Likes

#2

My workaround was to add the command myself to the Default.sublime-commands file in the Data/Packages/User directory of the installation folder. The command I added:

{
“caption”: “Add submodule at path”,
“command”: “git”,
“args”: { “argv”: [“submodule”, “add”, “$text”, “$text”] }
},

The first $text parameter is the url of the submodule and the second $text parameter is the relative path of the directory to which you want to add the submodule. Hope it helps!

0 Likes

Is there a way to add a submodule in a subfolder?