How to checkout to a remote branch in git
Hi there, in this short note, I’d like to show you how to checkout to a remote branch on your local machine.
Step 1: Fetch all the branches by using git fetch
This command will download the new branches to your local. For more detail about git fetch, you can look at the helping document by typing: git fetch --help.
After fetching, you can use the git branch -r to see all the remote branches to ensure that the branch you want to checkout has been downloaded.