When importing a theme into Hugo, we have to add a submodule. Deleting the .git file inside the folder or editing the submodules file doesn’t seem to do anything.
Is this intentional. Am I misunderstanding the idea of submodules?
When importing a theme into Hugo, we have to add a submodule. Deleting the .git file inside the folder or editing the submodules file doesn’t seem to do anything.
Is this intentional. Am I misunderstanding the idea of submodules?
What did you expect to see upon deleting those?
I didn’t expect a Hugo project’s theme usage to create git repos inside of my git repos. Does this happen when you use other tools?
What are the exact commands you typed?
Just the instruction given in the Hugo quickstart.
I think downloading the theme might work too and would avoid this issue, gonna test that out.
In that step, you are adding a git submodule. So the theme git repo’s .git gets created in your repo’s .git. That’s normal.
A SO answer on how to remove git submodules.
The reason there is a .git file in that folder is because git might clean out empty folders. The created folder and the .git file are placeholders for the parent repository signalling a submodule. There are commands to check out a submodules with it’s files in place, meaning there would be a full .git directory and the files of the submodule in that folder instead of just a .git file. Because the submodule is named in your .gitmodules file, removing the .git file is not breaking anything. Leave it anyway.