GitHub) 특정 디렉토리만 clone하기

kangdari·2020년 7월 9일
  1. 작업 폴더 생성
mkdir test
cd test 
  1. git 초기화
git inint
  1. Sparse Checkout 기능 활성화
git config core.sparseCheckout true
  1. clone하기 원하는 remote 저장소의 주소 선언
git remote add -f origin [repo URL]
  1. clone 또는 pull하기 원하는 특정 하위 폴더 또는 파일의 Path 선언
echo "[clone하고자 하는 폴더 경로]"> .git/info/sparse-checkout
  1. pull
git pull origin master

출처

0개의 댓글