본문 바로가기
Git/명령어

[ 깃(Git) ] 특정 Branch를 clone하고 싶을 때

by YWTechIT 2022. 3. 10.
728x90

📍 특정 Branch만 clone하고 싶을 때

보통 git clone <git URI> 명령어를 사용하면 default Branch를 받아오는 경우가 있다. 하지만 default Branch말고 다른 특정 Branchclone하고 싶다면 다음 명령어로 clone 할 수 있다.

728x90
# 명령어
git clone -b <branchName> --single-branch <git clone URL>

# example
git clone -b maintenance --single-branch https://github.com/YWTechIT/<repository>.git
반응형

댓글