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

 

Advertisements

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s