git branch
used to return all local and remote repositories.
Only git branch -a
would return all local and remote tracking branches (branches, not "repositories").
Check first if, as commented, this is a pager issue. Change shell (if you are on Windows, switch between CMD, Powershell or bash, to see if the issue persists)
git --no-pager branch
does work!
How do I fix git branch based on this info?
As noted in git config
:
To disable pagination for all commands, set core.pager
or GIT_PAGER
to cat
.
git config core.pager cat
But for disabling it only for git branch, you have various options as described in the similar question "How do I prevent 'git diff
' from using a pager?"
An alias for git -P branch
would be one of them. (-P
is --no-pager
)