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
