티스토리 뷰
git pull 할 때 submodule 의 변경사항 포함하여 함께 가져오는 경우 사용한다.
submodule 의 repository 를 처음 check out 하는 경우
git submodule update --init --recursive
이미 submodule repository 를 가져온 경우
git 버전 1.8.1 이상에서 사용하는 명령어
--remote 옵션이 추가되어 원격 branch의 최신 사항을 업데이트 하는 것이 추가되었다.
git submodule update --recursive --remote
이것은 .gitmodules 또는 .git/config 파일에 지정된 기본 브랜치를 가져온다.
(.git/config 파일이 있는 경우 기본값은 origin/master이다.)
git 버전 1.7.3 이상에서 사용하는 명령어
git submodule update --recursive
또는
git pull --recurse-submodules
repo가 가리키는 현재 커밋 대신 최신 커밋으로 하위 모듈을 가져오려는 경우.
'Git' 카테고리의 다른 글
Git 에서 Add 취소하는 방법 (0) | 2023.10.03 |
---|---|
[Git] git remote repository 변경 (0) | 2022.04.13 |
[Git] remote: Repository not found. (0) | 2022.04.08 |