How to update the local list of remote branches in git?

Question:

I have cloned one repository from GitHub and after some time there was a new branch created on GitHub. However, when I am executing git branch -a command, that remote branch is not showing in my local repository tracking. How do I update the local list of remote branches?

Answer:

To update the local list of remote branches:

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

Leave a Reply

Close Menu