μλΈλͺ¨λμ Git μ μ₯μ(Repo) μμ λ λ€λ₯Έ Git μ μ₯μλ₯Ό νμ λλ ν λ¦¬λ‘ ν¬ν¨ν μ μκ² ν΄μ£Όλ κΈ°λ₯μ λλ€.
μ¦, νλμ νλ‘μ νΈ μμ λ€λ₯Έ Git νλ‘μ νΈλ₯Ό μ°κ²°ν΄μ κ΄λ¦¬ν μ μκ² ν΄μ£Όλ κΈ°λ₯μ΄μμ.
my-project/
βββ .git/
βββ .gitmodules
βββ main-code/
βββ shared-lib/ β λ€λ₯Έ Git μ μ₯μκ° μ°κ²°λ μλΈλͺ¨λ
.gitmodules νμΌμ΄λ?μλΈλͺ¨λ μ 보λ₯Ό λ΄κ³ μλ μ€μ νμΌμ λλ€. μ:
[submodule "shared-lib"]
path = shared-lib
url = <https://github.com/example/shared-lib.git>
git submodule update --init --recursive