쇼핑몰 프로젝트를 위해 길벗 예제 소스를 clone하려는 중에,
https://github.com/gilbutITbook
gilbutITbook - Overview
gilbutITbook has 164 repositories available. Follow their code on GitHub.
github.com
https://github.com/gilbutITbook/006895
GitHub - gilbutITbook/006895: 자바 웹을 다루는 기슬_예제 소스
자바 웹을 다루는 기슬_예제 소스. Contribute to gilbutITbook/006895 development by creating an account on GitHub.
github.com
필요한 소스는 한 파일인데 다른예제 소스가 많아
하위폴더 bookShop만 clone하기로 했다.

git cmd실행 해 아래 명령어를 차례대로 입력한다.


git init
git remote add origin [저장소주소]
git config core.sparsecheckout true
echo [폴더명]/* >> .git/info/sparse-checkout
git pull origin [브랜치명]
https://standout.tistory.com/206
git 다운받기
git 깃또한 오픈소스 프로젝트로, 소스 코드가 공개되어있음. https://github.com/GIT/GIT GitHub - git/git: Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the Git Source Code Mir
standout.tistory.com
+ 상세기록

1. 원하는 경로로 이동해 폴더생성
C:\Users\409>d:
D:\>cd D:\409\sts3-workspace
D:\409\sts3-workspace>mkdir bookShop
D:\409\sts3-workspace>cd bookShop
2. git init
D:\409\sts3-workspace\bookShop>git init


3. git remote add origin [ssh주소]
D:\409\sts3-workspace\bookShop>git remote add origin https://github.com/gilbutITbook/006895.git

3. git config core.sparsecheckout true
D:\409\sts3-workspace\bookShop>git config core.sparsecheckout true
4. echo [폴더명]/* >> .git/info/sparse-checkout
D:\409\sts3-workspace\bookShop>echo bookShop01/* >> .git/info/sparse-checkout

5. git pull origin 브랜치명
D:\409\sts3-workspace\bookShop>git pull origin master

완료


'VCS > git' 카테고리의 다른 글
| 소스트리 한글깨짐 (0) | 2023.04.12 |
|---|---|
| git 이전 커밋버전으로 돌아가기, 브랜치초기화 (0) | 2023.03.30 |
| Git 프로필 이름 바꾸기, Change username (0) | 2023.03.22 |
| git이란? (0) | 2023.03.20 |
| git 다운받기 (0) | 2023.03.20 |