기계는 거짓말하지 않는다

Git 특정 브랜치 클론 (branch clone) 본문

Git

Git 특정 브랜치 클론 (branch clone)

KillinTime 2022. 11. 11. 20:56

git clone 명령어로 특정 브랜치만 클론하고 싶을 경우

1)

git clone -b [branch_name] [remote-repository-url]
git clone --branch [branch_name] [remote-repository-url]
# ex) git clone -b sdk/8.1 https://github.com/FFmpeg/nv-codec-headers.git

2)

git clone -b [branch_name] --single-branch [remote-repository-url]
git clone --branch [branch_name] --single-branch [remote-repository-url]
# ex) git clone -b sdk/8.1 -single-branch https://github.com/FFmpeg/nv-codec-headers.git
Comments