Created
May 17, 2011 05:55
-
-
Save michealbenedict/976018 to your computer and use it in GitHub Desktop.
Git Checkout branch locally from remote
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
# fetch branch if not in local and not tracked | |
git fetch origin remote_branch_name:local_branch_name | |
# checkout branch locally if branch is tracked after | |
# git status | |
git checkout -b local-name origin/remote-name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment