Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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