Git push/pull only the current branch

It could happens that git will try to push/pull from all the branches in the “tree”. For example ifyou have master->b1->b2 and you’re working in b2 you see that master is pushed/pulled as well when executing the command.

All you need to do is to instruct git to not doing it.

$ git config --global push.default current
$ git config --global pull.default current

 

3 thoughts on “Git push/pull only the current branch

Leave a comment