Skip to content
On this page

현재 브랜치가 추적하는 원격 브랜치 변경하기

Title
현재 브랜치가 추적하는 원격 브랜치 변경하기
Category
Git
Tags
Aliases
현재 브랜치가 추적하는 원격 브랜치 변경하기
Created
last year
Updated
last year
sh
$ git branch $(branch_name) -u $(remote_name)/$(branch_name)
$ git branch $(branch_name) -u $(remote_name)/$(branch_name)

Example

sh
$ git branch feat/awesome-feature -u origin/feature/awesome-feature
> branch 'feat/awesome-feature' set up to track 'origin/feature/awesome-feature'.

$ git branch feat/awesome-feature -u upstream/feature/awesome-feature
> branch 'feat/awesome-feature' set up to track 'upstream/feature/awesome-feature'.
$ git branch feat/awesome-feature -u origin/feature/awesome-feature
> branch 'feat/awesome-feature' set up to track 'origin/feature/awesome-feature'.

$ git branch feat/awesome-feature -u upstream/feature/awesome-feature
> branch 'feat/awesome-feature' set up to track 'upstream/feature/awesome-feature'.

Released under the MIT License.