November 11, 2013
After a recent update to Git I started getting the following message when doing a
warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default simple
push.default setting controls what happens when you do a
git push without specifying a branch. When
push.default is set to
matching all local branches are pushed to their matching remote pairs.
The new default,
simple, means that when you do a
git push without specifying a branch, only your current branch will be pushed to the one
git pull would normally get your code from.
As the message explains you can configure this setting in your
.gitconfig file by using one of the two lines below.
git config --global push.default matching
git config --global push.default simple
I’ve gone ahead and set my
push.default to be