I\'ve tried git branch -r, but that only lists remote branches that I\'ve tracked locally. How do I find the list of those that I haven\'t? (It doesn\'t matter
Using git branch -r lists all remote branches and git branch -a lists all branches on local and remote. These lists get outdated though. To keep these lists up-to-date, run
git remote update --prune
which will update your local branch list with all new ones from the remote and remove any that are no longer there. Running this update command without the --prune will retrieve new branches but not delete ones no longer on the remote.
You can speed up this update by specifying a remote, otherwise it will pull updates from all remotes you have added, like so
git remote update --prune origin