personal website.
Table of contents
This website is a great example: ogios.github.io
blogs are in another repo, and it's been added as a submodule under /contents/blogs, blgos has it's own scripts and metadata./projects, they all provide a build cmd: build:submodule , dist will be moved to /.output/public.Warning
Git submodules is not fully bind with branches, but file .gitmodules does.
This may be confusing, for example:
.gitmodules, module's directory will be created but modules won't be initialized.Note
it's recommended to use GUI or TUI.
I personally use lazygit for every git related operations, it's a TUI project and enough for normal use.
Add a submodule:
git submodule add <url> <path>
Remove a submodule:
git rm --force -r <path>
Update from upstream:
git submodule update --remote --recursive [ -- <path>]
Init submodule:
git submodule update --init --force [ -- <path>]
You should not be afraid of deleting anything under a submodule./.gitmodules records every submodule's path and with git submodule update --init --force it will be recovered.