gitgithubbranchremote-branch

When does Git refresh the list of remote branches?


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?


Solution

  • 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