Modúil Git a bhíonn ag ligint duit stór Git amháin a leabú taobh istigh de stór Git eile mar fhothreoir — úsáideach do leabharlanna nó spleáchais roinnte a áireamh mar stóir ar leithligh. Tá siad cumhachtach ach tá drochthúairm orthu maidir le castacht, mar sin is fiúntach iad agus na roghanna eile a thuiscint.
Cad atá i modúil
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
