Skip to content

@aemkei /0. create local branch
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
push existing local branch to remote
#syntax
git checkout -b name_of_local_branch
#example
git checkout -b experimental
#syntax
git push my_repo name_of_local_branch:refs/heads/name_of_remote_branch
#example
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
#example
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.