One liner to git push and create a new remote branch
Sometimes I want to push local changes on master to a new branch on origin. If you don't want to create a local branch then this one-liner will help:
git push origin HEAD:refs/heads/new-branch-name
This will create a new branch on origin named new-branch-name
Written by Matthew Deiters
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#