[git] submodule

Darcy Daeseok YU ·2023년 7월 25일
0

Node 시퀄라이저 등의 모델 변경사항을 어떻게 전파할 것인지에 대한 고찰

서브모듈 추가
git submodule add (repository_path) (folder_name) as alias

메인 프로젝트
git fetch
git merge origin/master

서브 모듈
git submodule update --remote 모두 변경사항 업데이트 from github remote

  1. 메인프로젝트 git merge origin/합칠 브랜치 후

  2. 서브모듈 git submodule update --remote로 변경사항을 업데이트 한다.

git 설명: 서브모듈

서브모듈 설정중에 꼬였을때

  1. root 디렉토리 > .gitmodules 에 필요없는 submodule 제거
[submodule "path_to_submodule"]
        path = path_to_submodule
        url = https://github.com/path_to_submodule
  1. .git/config 에서 해당 모듈 정리 vim or code
  2. rm -rf .git/modules/path_to_submodule

서브 모듈 생성 후 다른 프로젝트에 설정할 때

git submodule add (git_url) (folder_name)

서브 모듈 포함된 프로젝트 처음으로 불러올 때

git submodule update --init

서브 모듈에 업데이트 사항있을 경우

git submodule update --remote

profile
React, React-Native https://darcyu83.netlify.app/

0개의 댓글