Git Submodules: Cheat Sheet
A submodule is a reference to another Git repository inside your project. Useful when you need to include an external library or shared code, but keep it in a separate repo. 💡 A submodule stores not the code, but a reference to a specific commit of the external repo. Add a submodule # Add a repo as a submodule to a specific path git submodule add <URL> <path/to/place> # Example git submodule add https://github.com/luizdepra/hugo-coder.git themes/hugo-coder # Commit changes git commit -m "Add submodule: themes/hugo-coder" git push After this, your project will have: ...