How can I push a local Git branch to a remote with a different name easily?
问题 I've been wondering if there's an easy way to push and pull a local branch with a remote branch with a different name without always specifying both names. For example: $ git clone myrepo.git $ git checkout -b newb $ ... $ git commit -m "Some change" $ git push origin newb:remote_branch_name Now if someone updates remote_branch_name, I can: $ git pull And everything is merged / fast-forwarded. However, if I make changes in my local "newb", I can't: $ git push Instead, I have to: % git push