-
-
Save sffej/4bbed0ac622c3df51a9f1ca895303b7f to your computer and use it in GitHub Desktop.
Git checkout remote branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//To fetch a branch, you simply need to: | |
git fetch origin | |
//This will fetch all of the remote branches for you. With the remote branches | |
//in hand, you now need to check out the branch you are interested in, giving | |
//you a local working copy: | |
git checkout -b test origin/test | |
//Or | |
git branch test origin/test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment