Created
July 3, 2013 07:08
-
-
Save markSci5/5916003 to your computer and use it in GitHub Desktop.
Git checkout remote branch
This file contains 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 |
which is the same thing as running git checkout -b test origin/test
Where does my data end up when I call
git push
? Should I set some upstream?
How to do git push .......
Thanks for this tip!
Don't forget to do a git pull
first otherwise git checkout branch
will fail with unknown path spec.
Thanks very much
git fetch origin name:name (will download a specific branch)
git fetch origin name:name (will download a specific branch)
THANK YOU SO MUCH, literally, this is the only solution that worked to me!! :>
To check remote branches use: git branch -r
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@americanhanko: 'folder at the root of the repository with sam name' - you saved me dude - thanks a lot!!!!