[git] branch 확인

JAsmine_log·2025년 3월 20일

Git branch 확인

Local branch 확인

git branch
* main
  • *가 있으면 현재 브랜치 의미

Remote branch 확인

git branch -r
  remotes/origin/main

Local + Remote branch 확인

git branch -a
* main
  remotes/origin/main

현재 branch와 연결된 원격 branch 확인

(마지막 commit 정보도 함께 나온다)

git branch -vv
* main 1504e0b [origin/main] last commit

브랜치 상세 정보 확인

git remote show origin
* remote origin
  Fetch URL: https://github.com/username/repo.git
  Push  URL: https://github.com/username/repo.git
  HEAD branch: main
  Remote branches:
    main       tracked
    dev        tracked
    feature-branch tracked
profile
Everyday Research & Development

0개의 댓글