본문 바로가기

Git

Linux(ubuntu) 서버에서 Github 소스 다운받기

커밋된 깃허브 소스를 다운받거나 수정해야할 때가 있다.

 

# 특정폴더만 가져오기

 

git init

 

git config core.sparseCheckout true

 

git remote add -f origin {url}

 

echo "{directoryname}" >> .git/info/sparse-checkout (디렉토리 가져오기)

 

git pull origin main 

'Git' 카테고리의 다른 글

깃허브 데스크탑에서 Push, Fetch 하는법  (0) 2022.01.13