Embed URL


SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Git Checkout branch locally from remote

View git-cheat.txt
1 2 3 4 5 6
# 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
Something went wrong with that request. Please try again.