To initialize newly created github repo add new remote. Let's name it
other-repo
.git remote add other-repo https://github.com/xxx/yyy.gitTo push
local-branch
as remote master
:git push -u other-repo local-branch:masterTo later push any new commits (this can be simplified using git's config option
push.default
):git push other-repo local-branch:masterTo delete the tracking without deleting remote branch:
git branch local-branch --unset-upstreamTo make existing local branch track existing remote branch (master):
git branch other-repo/master local-branchTo see all the trackings:
git branch -vv
git version 1.9.1