개발 관련/GitHub
[Git] remote 원격 브랜치 로컬로 가져오기
아렉스_Arex
2024. 3. 5. 12:31
반응형
checkout
로컬 브랜치 이름을 별도로 설정하려고자할 때
git checkout -b <branch> --track <remote>/<branch>
git checkout -b <branch> -t <remote>/<branch>
원격저장소 브랜치 이름을 그대로 사용할 때
git checkout -t <remote>/<branch>
참고
https://git-scm.com/docs/git-checkout
Git - git-checkout Documentation
When there is only one argument given and it is not -- (e.g. git checkout abc), and when the argument is both a valid (e.g. a branch abc exists) and a valid (e.g. a file or a directory whose name is "abc" exists), Git would usually ask you to disambiguate.
git-scm.com