Coding/Tip
[GIT] 특정 폴더만 받아오기
chobocho
2017. 7. 22. 04:18
[ Using a sparse-checkout to clone speical folder only ]
mkdir paperjs
cd paperjs
git init
git remote add origin https://github.com/paperjs/paperjs.github.io.git
git config core.sparsecheckout true
echo "examples/*" >> .git/info/sparse-checkout
# Tip!!
# Windows power shell에서는 하기와 같이 하여야 함
# 그렇지 않으면
# error: Sparse checkout leaves no entry on the working directory 에러 메시지가 보임
# echo "examples/*"| out-file -encoding ascii .git/info/sparse-checkout
#
git pull --depth=2 origin master
* 참고 사이트 : https://stackoverflow.com/questions/23289006/on-windows-git-error-sparse-checkout-leaves-no-entry-on-the-working-directory