Git સબમોડ્યુલ્સ તમને એક Git રિપોઝિટરી બીજા એક જેવી જગ્યામ એમ્બેડ કરવા દે છે — શેરર્ડ લાઇબ્રેરીઝ અથવા ડિપેન્ડેન્સીઝને અલગ રેપોઝ તરીકે શામેલ કરવા માટે ઉપયોગી છે. તેઓ શક્તિશાળી છે પણ જટિલતાના નામે જાણીતા છે, તેથી તેમને અને વિકલ્પોને સમજવું મૂલ્યવાન છે.
સબમોડ્યુલ્સ શું છે
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
