Skip to content

Instantly share code, notes, and snippets.

@michealbenedict
Created May 17, 2011 05:55
Show Gist options
  • Save michealbenedict/976018 to your computer and use it in GitHub Desktop.
Save michealbenedict/976018 to your computer and use it in GitHub Desktop.
Git Checkout branch locally from remote
# 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