When does Git refresh the list of remote branches?

BendEg picture BendEg · Apr 1, 2016 · Viewed 320.9k times · Source

Using git branch --all shows all remote and local branches. When does Git refresh this list?

On pull/push? And how do I refresh it using Git Bash?

Answer

centralcmd picture centralcmd · Apr 1, 2016

To update the local list of remote branches:

git remote update origin --prune

To show all local and remote branches that (local) Git knows about

git branch -a