Skip to content
On this page

현재 로컬 브랜치에서 추적하고 있는 리모트 브랜치 보기

Title
현재 로컬 브랜치에서 추적하고 있는 리모트 브랜치 보기
Category
Git
Tags
Aliases
현재 로컬 브랜치에서 추적하고 있는 리모트 브랜치 보기
Created
2 years ago
Updated
last year

git remote show

sh
$ git remote show <name>
$ git remote show <name>

리모트 <name>에 대한 정보를 제공한다.

Example

$ git remote show origin
- remote origin
  Fetch URL: https://github.com/younho9/example.git
  Push  URL: https://github.com/younho9/example.git
  HEAD branch: develop
  Remote branches:
    develop                         tracked
    feature/1                       tracked
    fix/2                           tracked
    refactor/1                      tracked
    master                          tracked
  Local branches configured for 'git pull':
    develop        merges with remote develop
    feature/1      merges with remote feature/1
  Local refs configured for 'git push':
    develop        pushes to develop        (up to date)
    feature/1      pushes to feature/1      (local out of date)
$ git remote show origin
- remote origin
  Fetch URL: https://github.com/younho9/example.git
  Push  URL: https://github.com/younho9/example.git
  HEAD branch: develop
  Remote branches:
    develop                         tracked
    feature/1                       tracked
    fix/2                           tracked
    refactor/1                      tracked
    master                          tracked
  Local branches configured for 'git pull':
    develop        merges with remote develop
    feature/1      merges with remote feature/1
  Local refs configured for 'git push':
    develop        pushes to develop        (up to date)
    feature/1      pushes to feature/1      (local out of date)

git branch -vv

업스트림 브랜치와 관계 있을 경우, 업스트림 브랜치와 함께 헤드의 커밋 제목을 제공한다.

sh
$ git branch -vv
$ git branch -vv

Example

develop                 5ca90d51 [origin/develop] Merge branch 'feature/ISRIR-3894' into 'develop'
feature/1               5ca90d51 Merge branch 'feature/3' into 'develop'
feature/2               c0132e12 [origin/feature/2: behind 42] Merge branch 'feature/4' into 'feature/4'
upstream/feature/3      90090d36 [remotes/upstream/feature/3] Merge branch 'feature/5' into 'feature/5'
develop                 5ca90d51 [origin/develop] Merge branch 'feature/ISRIR-3894' into 'develop'
feature/1               5ca90d51 Merge branch 'feature/3' into 'develop'
feature/2               c0132e12 [origin/feature/2: behind 42] Merge branch 'feature/4' into 'feature/4'
upstream/feature/3      90090d36 [remotes/upstream/feature/3] Merge branch 'feature/5' into 'feature/5'

References

Released under the MIT License.