테스트 필요

 

현재 경로에서 서브모듈로 다른 프로젝트 추가하기

$ git submodule add https://github.com/chaconinc/DbConnector

 

서브모듈 초기화하고 받아오기 (저장소만 업데이트)

$ git submodule init
Submodule 'DbConnector' (https://github.com/chaconinc/DbConnector) registered for path 'DbConnector'
$ git submodule update

 

혹은 받아올 때 서브모듈 초기화 같이 하기(이게 편리할 듯)

$ git clone --recurse-submodules https://github.com/chaconinc/MainProject

 

서브모듈의 저장소 갱신시 최신버전을 가져오기(git pull ?)

$ git submodule update --remote

 

make 할때 git submodlue update --remote를 추가해두니 편하긴 한데

이래저래 귀찮다. -ㅁ-

 

[링크 : https://git-scm.com/book/ko/v2/Git-도구-서브모듈]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git diff --staged  (0) 2022.09.05
git reset 서버 commit  (0) 2021.09.14
git blame  (0) 2021.06.21
git pull rebase 설정  (0) 2021.06.02
git log --stat  (0) 2021.05.10
Posted by 구차니