Git 클론 시 서브모듈이 빈 폴더일 때

leyoug·2021년 8월 30일
0

현상

클론을 받았는데 서브모듈 폴더가 비어있다

해결

클론 시 --recursive 를 추가하면 서브모듈까지 받아온다

git clone https://github.com/leyoug/test.git --recursive

만약 다른 브랜치에 서브모듈이 있을 경우 해당 브랜치로 이동한 다음 아래와 같이 업데이트해주면 된다

git submodule update --init

참고

https://stackoverflow.com/questions/11358082/empty-git-submodule-folder-when-repo-cloned

profile
기록하자!

0개의 댓글