Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

노우!쑤

[Git]특정 폴더만 받아오기 본문

DevOps

[Git]특정 폴더만 받아오기

no500 2022. 1. 27. 18:33
# 테스트폴더 생성
mkdir GitTest
 
 
# 폴더 이동
cd GitTest
 
 
# Git 초기화
git init
 
 
# 설정 활성화
git config core.sparseCheckout true
 
 
# Git remote 추가
git remote add -f origin ssh://root@10.3.205.62:22/git-repo/LOSTARK.git
 
 
# 체크아웃 폴더 정의
echo "WEB/CIOS/Auth/*"| out-file -encoding ascii .git/info/sparse-checkout
 
 
# Pull요청
git pull origin master

 

이슈

error: Sparse checkout leaves no entry on the working directory

sparse-checkout 파일이 기본적으로 UTF-8로 인코딩된다.

out-file -encoding ascii .git/info/sparse-checkout 옵션으로 ascii 저장해야함.

 

잡담

꼭 써야한다면 어쩔 수 없지만,

구조를 바꿀 수 있으면 바꾸자.

'DevOps' 카테고리의 다른 글

[kibana] 메뉴 숨기기  (0) 2022.02.10
[CentOS] rpm 설치 제거  (0) 2022.02.10
[Docker]Registry 명령어  (0) 2022.01.18
[Docker-Compose] Error  (0) 2021.11.24
[Docker] Exit 오류 확인 하기  (0) 2021.11.24