Git submodules तुम्हाला एक Git repository दुसऱ्या Git repository मध्ये subdirectory म्हणून embed करू देतात — शेअर केलेल्या लायब्रेरीज किंवा dependencies वेगळ्या repos म्हणून समाविष्ट करण्यासाठी उपयोगी. ते शक्तिशाली आहेत परंतु त्यांचा जटिलतेचा नाव आहे, त्यामुळे त्यांना आणि विकल्पांना समजणे मूल्यवान आहे.
Submodules काय आहेत
A SUBMODULE is a reference to ANOTHER Git repository at a SPECIFIC COMMIT, embedded in
your repo as a subdirectory:
→ the parent repo records WHICH repo and WHICH commit (a pinned reference, not a copy)
→ the submodule is its own repo with its own history
→ Used to include shared libraries/components that are themselves versioned repos.
git submodule add <url> path/to/lib
git --recurse-submodules <url>
git submodule update --init --recursive
git submodule update --remote
