less than 1 minute read

STEP1. Clone 대상 로컬 저장소 생성

git init "로컬저장소명"
cd "로컬저장소명"

STEP2. sparse Checkout 을 True 로 설정

# 일부 경로의 파일만 다운로드 가능하도록 한다.
git config core.sparseCheckout true

STEP3. 다운로드 할 원격 저장소 주소 설정

  git remote add -f origin "원격저장소주소"

STEP4 .git/info/sparse-checkout 파일 기술

# 다운로드 받길 원하는 폴더나 파일의 경로를 기술한다
# 폴더일 경우, 자동으로 하위 폴더가 포함된다.
echo "파일및폴더경로" >> .git/info/sparse-checkout

STEP5. git pull (sparse-checkout 기술된 경로의 파일만 다운)

git pull origin main

💡 자꾸 잊어버려서 포스팅

Tags: ,

Categories:

Updated:

Leave a comment