Git submodules ले तपाईंलाई एक Git रिपोजिटरी अर्कोको भित्रमा subdirectory को रूपमा एम्बेड गर्न दिन्छ — साझा लाइब्रेरी वा निर्भरताहरू अलग रिपोजिटरीहरूको रूपमा समावेश गर्न उपयोगी। तिनीहरू शक्तिशाली छन् तर जटिलताको लागि प्रतिष्ठा छ, त्यसैले तिनीहरू र विकल्पहरू बुझ्न मूल्यवान छ।
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
