Subtree 관리
- 상위 저장소 생성 및 이동
- 원격 참조 추가
git remote add {Remote name} {Child Repo url} git remote add ai-summary https://github.com/changhwan/ai-summary git remote -v
- Subtree로 추가
git subtree add --prefix { Child path(where to go) } { Remote repo name } { Child branch } git subtree add --prefix=(해당 Repository 하위의 디렉터리 구조) (옮겨올 Repository 주소) (옮겨올 Repository의 branch) git subtree add --prefix ai-summary remote-child main
- Subtree 관리
- push
git subtree push --prefix { Child path } { Remote repo name } { Child branch }
- pull
git subtree pull --prefix { Child path(where to go) } { Remote repo name } { Child branch }
Reference https://iseongho.github.io/posts/git-subtree/ https://blog.rhostem.com/posts/2020-01-03-code-sharing-with-git-subtree