Git doesn’t allow to work on remote branches directly so you can’t literally checkout a remote branch.
If you want to checkout a remote branch, you need to create your own local “copy” of that branch and then check it out.
This note shows how to do this.
Cool Tip: Compare branches in Git using the
git diff command! Read more →
Git – Checkout Remote Branch
Make sure that you have the latest branch list from the remote repository locally:
$ git fetch -a
List all the branches (both local and remote):
$ git branch -a
Use the following Git command to checkout a remote branch:
$ git checkout <remote-branch>