Git - push only current branch
By default, when you type git push
git pushes all your local branches that are tracking remote branches on a remote you are pushing to (if you don't specify remote, that's origin).
Here is the command which will tell git to push only current branch by default:
git config --global push.default current
Written by Goran Peretin
Related protips
1 Response
I prefer to use simple
:)
(which is almost the same but refuses to push if the remote branch's name is different)
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#