• Home
  • About
    • Seokmin.Lee photo

      Seokmin.Lee

      Hello, I am a master's student in the Department of Convergence Security (Samsung Advanced Security) at Korea University.After graduation, I am expected as a security developer or researcher member of Samsung SDS.

    • Learn More
    • LinkedIn
    • Github
  • Posts
    • All Tags

[git]특정 하위 폴더 클론

05 May 2021

git 특정 폴더 clone

directory생성

$ mkdir PROJECT ; cd PROJECT

git 설치

$ git init

git 저장소 연결

$ git remote add origin 저장소주소

git sparse checkout 활성화

$ git config core.sparsecheckout true

clone 하기 위한 폴더 경로 설정

$ echo 폴더경로/* » .git/info/sparse-checkout

저장소에서부터 pull

$ git pull origin master

weak point

상위 폴더 명을 계속 살아있다. 즉, 내가 원하는 폴더의 파일만 관리를 시키고 싶어도 1/SRC/* 에서 SRC/ 디렉토리의 계속되는 존재



git Share Tweet +1