A가 루트고 B가 추가할 서브모듈일 때

submodule 생성

$ git submodule add <B의 Git 저장소 URL> <A 내에서의 경로>

만약 A가 루트고 A/subB 라고 만들고싶으면

$ git submodule add <B의 Git 저장소 URL> subB

push

루트에서

루트에서 module-B 로 가서 commit/push

루트에서 module-root 로 가서 add / commit / push

update

$ git submodule update --init --recursive