TOOL/VCS 2016. 6. 18. 22:58

///// Git (깃)


체계적인 소스관리를 위해 


서브모듈 관리가 필요한 시점이 있다.




///// Submodule

- add submodule

git submodule add {gitRepositoryURL} {projectFolder}

git add --all

git commit -m 'add sj submodule'


- remove submodule

git submodule deinit -f {projectFolder}


- issue #1  “already exists in the index”

1. check submodule

git ls-files --stage {projectFolder}


2. remove submodule cache

git rm --cached {projectFolder}


3. readd submodule

git submodule add {gitRepositoryURL} {projectFolder}




///// 참고

6.6 Git 도구 - 서브모듈:

https://git-scm.com/book/ko/v1/Git-%EB%8F%84%EA%B5%AC-%EC%84%9C%EB%B8%8C%EB%AA%A8%EB%93%88


Issue with adding common code as git submodule: “already exists in the index”:

http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index

'TOOL > VCS' 카테고리의 다른 글

[Git] reflog 작업 복구하기  (0) 2016.07.15
[Git] SSH 공개키 생성  (0) 2016.06.21
[Git] tag  (0) 2016.04.13
[Git] cherry-pick (특정 커밋의 변경사항만 복사)  (0) 2016.04.13
[Git] 원격저장소의 커밋 지우기  (0) 2016.02.18