Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
push existing local branch to remote
git checkout -b name_of_local_branch
git checkout -b experimental
git push my_repo name_of_local_branch:refs/heads/name_of_remote_branch
git push origin experimental:refs/heads/experimental
# syntax
mate .git/config
[branch "name_of_local_branch"]
remote = my_repo
merge = refs/heads/name_of_remote_branch
mate .git/config
[branch "experimental"]
remote = origin
merge = refs/heads/experimental
# syntax
git fetch
git checkout --track -b name_of_local_branch origin/name_of_remote_branch
# example
git fetch
git checkout --track -b experimental origin/experimental
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.