컴공생의 다이어리

[Git] 깃 특정 브랜치(branch)만 clone하는 방법 본문

Development/Git

[Git] 깃 특정 브랜치(branch)만 clone하는 방법

컴공 K 2021. 8. 23. 00:01

깃(Git) 특정 브랜치(branch)만 clone하는 방법

git clone -b {브랜치이름} --single-branch {저장소 url} 을 git bash 창에 입력해주면 된다.

git clone -b {branch_name} --single-branch {저장소 URL}
# ex) git clone -b release --single-branch https://github.com/CodeDiary18/Test

 

 

 

 

https://www.slipp.net/questions/577

 

git에서 특정 브랜치만 clone하는 방법

git을 사용하다 브랜치 전체를 clone하지 않고 특정 브랜치 하나만 clone하는 것이 가능하다. 특히 브랜치가 많은 경우 이 방법을 사용할 수 있다. git clone -b {branch_name} --single-branch {저장소 URL} ex) git

www.slipp.net

 

728x90
Comments