Git 원격 브랜치가 보이지 않는 현상

1 개요[ | ]

Git branch가 보이지 않는 현상
Git 원격 브랜치가 보이지 않는 현상
Git 오리진의 브랜치가 보이지 않는 현상

2 문제상황[ | ]

Console
Copy
# git fetch origin
# git branch -a
* main
  remotes/origin/HEAD -> origin/main
  remotes/origin/main
→ git fetch origin을 했음에도 오리진의 브랜치가 보이지 않는다.
Console
Copy
# git config remote.origin.fetch
+refs/heads/main:refs/remotes/origin/main
→ main만 fetch하도록 설정되어 있다.

3 조치방법[ | ]

Bash
Copy
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
→ 모든 브랜치를 fetch하도록 설정한다.

4 같이 보기[ | ]

5 참고[ | ]