git push current branch
I have this as a bash alias, but you can run however you want.
git push origin `git rev-parse --abbrev-ref HEAD`
Pushes current branch to a remote called origin (and remote branch of same name as local)
Written by Chris Sedlmayr
Related protips
2 Responses
I think you can just execute this command git push origin HEAD
over 1 year ago
·
You can also set this as the default by setting push.default
to upstream
http://www.kernel.org/pub/software/scm/git/docs/git-config.html so that git push
will push the current branch to its upstream
over 1 year ago
·
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#