#TIL #git 리모트 브랜치 조회

$ git fetch

가져온다.

$ git branch -r
  origin/feature-1234

리모트 브랜치만 조회. -v 옵션을 추가하면 커밋 메시지도 같이 볼 수 있다.

$ git branch -a
* feature-1234
  master
  remotes/origin/feature-1234

모두 조회. 마찬가지로 -v 옵션 사용할 수 있다.

$ git branch -vv
* feature-1234 1234567890 [origin/feature-1234] commit message 1
  master       123456789a [origin/master      ] commit message 2

트래킹 정보를 출력하려면 -vv 옵션을 사용한다.

$ git remote show origin

따끈따끈한 정보를 바로 조회할 수도 있다. 그냥 구경만 하는 게 아니고 뭔가 하려면 결국 git fetch 명령을 해야 한다.

참고

Feedback plz <3 @ohyecloudy, ohyecloudy@gmail.com

A Random Post