Last Updated: February 25, 2016
·
2.186K
· gperetin

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

1 Response
Add your 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 ·