Git remote 의 branch 를 가져왔던 경험
remote test origin
이 있다
origin 는 원본 test 는 원본을 fork 한 브랜치
우리는 origin 에 dev barnch 에서 org 라는 branch를 생성했다
git remote update
C:\new-platform\admin>git remote updateFetching originremote: Enumerating objects: 84, done.remote: Counting objects: 100% (41/41), done.remote: Compressing objects: 100% (16/16), done.remote: Total 84 (delta 27), reused 37 (delta 25), pack-reused 43Unpacking objects: 100% (84/84), 19.80 KiB | 101.00 KiB/s, done.From gitlab.com:platform/admin * [new branch] #370 -> origin/#370 * [new branch] #372 -> origin/#372 * [new branch] 361 -> origin/361 * [new branch] 362 -> origin/362 * [new branch] 365 -> origin/365 * [new branch] 373 -> origin/373 * [new branch] 376-qr-query-param-site-type -> origin/376-qr-query-param-site-type * [new branch] 378 -> origin/378 * [new branch] 379 -> origin/379 * [new branch] 382 -> origin/382 * [new branch] 385 -> origin/385 * [new branch] 387 -> origin/387 * [new branch] 391 -> origin/391 * [new branch] 392 -> origin/392 * [new branch] cherry-pick-2c5387aa -> origin/cherry-pick-2c5387aa * [new branch] cherry-pick-2d5348d4 -> origin/cherry-pick-2d5348d4 * [new branch] cherry-pick-2e34e538 -> origin/cherry-pick-2e34e538 * [new branch] cherry-pick-69daa442 -> origin/cherry-pick-69daa442 * [new branch] cherry-pick-6b24c810 -> origin/cherry-pick-6b24c810 * [new branch] cherry-pick-96d3a4f5 -> origin/cherry-pick-96d3a4f5 * [new branch] cherry-pick-9ac4b1ef -> origin/cherry-pick-9ac4b1ef f969ef2..5da4a0b master -> origin/master * [new branch] org -> origin/org 380d52c..2d5348d staging -> origin/staging * [new tag] R-220112.v1 -> R-220112.v1 * [new tag] R-220119.v1 -> R-220119.v1 * [new tag] R-220120.v1 -> R-220120.v1 * [new tag] R-220126.v1 -> R-220126.v1 * [new tag] R-220203.v1 -> R-220203.v1 * [new tag] R-220217.v2 -> R-220217.v2 * [new tag] R-220203.v2 -> R-220203.v2 * [new tag] R-220203.v3 -> R-220203.v3 * [new tag] R-220210.v1 -> R-220210.v1 * [new tag] R-220214.v1 -> R-220214.v1 * [new tag] R-220217.v1 -> R-220217.v1 * [new tag] R-220224.v1 -> R-220224.v1 * [new tag] R-220303.v1 -> R-220303.v1Fetching myremote: Enumerating objects: 52, done.remote: Counting objects: 100% (45/45), done.remote: Total 52 (delta 45), reused 45 (delta 45), pack-reused 7Unpacking objects: 100% (52/52), 20.14 KiB | 164.00 KiB/s, done.From gitlab.com:gwiyeomGo/admin * [new branch] #140 -> gwiyeom/#140 * [new branch] #154 -> gwiyeom/#154 * [new branch] #17 -> gwiyeom/#17 * [new branch] #232 -> gwiyeom/#232 * [new branch] #295 -> gwiyeom/#295 * [new branch] #296 -> gwiyeom/#296 * [new branch] #80 -> gwiyeom/#80 * [new branch] main -> gwiyeom/main
git 명령어!
-
자신의 로컬 branch 목록 보기
git branch -list
-
remote branch 보기
git branch -r
-
remote + 로컬 branch
git branch -a
-
원격 저장소(remote) 의 브랜치 가져오기
git checkout -t
를 사용한다
- ex) origin 에 test branch 를 가져오고 싶다면
git checkout -t origin/test
실제 사용 경험 (20220612)
- dev branch 에서 feature 를 gitLab 에서 생성
- dev 는 이번주에 배포할 commit 들이 있다.
- 나는 feature 에서 작업하고 싶다
실제 사용 경험 ->
git remote update
해서 feature 가 있는 현재 상태 origin remote 를 업데이트 하고
git checkout -t origin/feature
origin 에 있는 feature branch 로 checkout