Problem: Despite git fetch --all
, git branch --all
just shows your local branches.
Cause: Did you clone your repository initially with git clone -b <branch name> <remote>
? You can very this by running:
$> git config remote.origin.fetch
+refs/heads/<branch name>:refs/remotes/origin/<branch name>
If you get an output like the one above, you did initially clone with -b
most likely.
Solution: git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'