submodule 과 가장 큰 차이는 하나의 .git에서 관리한다는 것
git subtree init.gitmodules같은거 안만들고
- config 에 remote등록해서 관리
- 그냥 아무렇게 수정하고 커밋하고 push pull만 여러군대 해주면 알아서 해당 커밋만 간다
- submodule이 의식하며 개발해야한다는 것이 가장 큰 차이
프로젝트간 dependency가 있으면 subtree가 더 간편하다
Git repo로서 가져오는 것이 아니라 단순히 디렉토리/파일을 가져오므로 디렉토리에는 Git repo 설정을 담고 있는 .git 디렉토리가 없다.
Sub Repo
Main Repo
Update from main repo
git subtree - 프로젝트 안의 또 다른 프로젝트
Context이 블로그는 hexo 블로그 플랫폼에 tranquilpeak 테마를 적용하고 GitHub 호스팅에서 돌고 있다. tranquilpeak이 아주 마음에 들었지만 기본 폰트가 눈에 거슬렸다. 그래서 고쳐쓰려고 보니, 지속적으로 계속 내가 원하는 폰트를 적용하려면 단순히 CSS 어딘가를 고치면 끝나는 환경이 아니었다. 테마 자체를 사용자 버전이 아닌
https://homoefficio.github.io/2015/07/18/git-subtree/
[Git] Subtree 사용법 - 프로 삽질러의 개발 삽질 기록장 및 다이어리
CodeDeploy를 적용 하기 위해 일단 Git SubModule을 정리할 필요가 생겼다. CTO님이 Git SubTree도 한번 조사 해보고 이를 사용하는게 어떻겠냐 라는 말씀을 하셔서 일단 Subtree를 조사해보고 SubTree를 적용하는 방법을 정리해 보았다. 현재 FingerProject에서 쓰이고 있는 방식. Git 저장소 안에 또 다른 저장소가 들어가 있는 개념이다. 원래 FingerProject안에는 FingerWeb, FingerMD...
https://select995.netlify.app/git/git-subtree
![[Git] Subtree 사용법 - 프로 삽질러의 개발 삽질 기록장 및 다이어리](https://www.notion.so/image/https%3A%2F%2Fuser-images.githubusercontent.com%2F36795031%2F39440781-031b6694-4ce7-11e8-8fba-75cb450e889c.jpg?table=block&id=3d116cb1-7273-42d2-b2e0-3c083bbc18b1&cache=v2)
How to use git subtree to add local repo?
Say I have a dir that is already a git repo "sub", now I want it to be a subtree of my newly created super directory "sup". I've searched the document, but all the tutorials are about adding a rem...
https://stackoverflow.com/questions/37775092/how-to-use-git-subtree-to-add-local-repo
Differences between git submodule and subtree
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.
https://stackoverflow.com/questions/31769820/differences-between-git-submodule-and-subtree/38837861#38837861
Git subtree를 활용한 코드 공유
서비스를 개발하다 보면 코드를 공유해야 하는 일이 생긴다. 백엔드를 마이크로 서비스 구조로 개발하면 API 리스펀스, 각종 데이터 모델에 같은 타입을 사용해서 일관성을 유지해야 한다. 그리고 프론트엔드 웹을 데스크탑, 모바일로 분리해서 개발한다면 데이터 모델뿐만 아니라 컴포넌트 및 다양한 유틸리티 모듈을 함께 사용할 필요가 생긴다.
https://blog.rhostem.com/posts/2020-01-03-code-sharing-with-git-subtree

Seonglae Cho