Warning: push.default is unset; its implicit value is changing in Git 2.0
It's explained in great detail in the docs, but I'll try to summarize:
matching
meansgit push
will push all your local branches to the ones with the same name on the remote. This makes it easy to accidentally push a branch you didn't intend to.simple
meansgit push
will push only the current branch to the one thatgit pull
would pull from, and also checks that their names match. This is a more intuitive behavior, which is why the default is getting changed to this.
This setting only affects the behavior of your local client, and can be overridden by explicitly specifying which branches you want to push on the command line. Other clients can have different settings, it only affects what happens when you don't specify which branches you want to push.
I realize this is an old post but as I just ran into the same issue and had trouble finding the answer I thought I'd add a bit.
So @hammar's answer is correct. Using push.default simple
is, in a way, like configuring tracking on your branches so you don't need to specify remotes and branches when pushing and pulling. The matching
option will push all branches to their corresponding counterparts on the default remote (which is the first one that was set up unless you've configured your repo otherwise).
One thing I hope others find useful in the future is that I was running Git 1.8 on OS X Mountain Lion and never saw this error. Upgrading to Mavericks is what suddenly made it show up (running git --version
will show git version 1.8.3.4 (Apple Git-47)
which I'd never seen until the update to the OS.
If you get a message from git complaining about the value 'simple' in the configuration, check your git version.
After upgrading Xcode (on a Mac running Mountain Lion), which also upgraded git from 1.7.4.4 to 1.8.3.4, shells started before the upgrade were still running git 1.7.4.4 and complained about the value 'simple' for push.default in the global config.
The solution was to close the shells running the old version of git and use the new version.
I was wondering why I was getting that big warning message on Ubuntu 16.04 (which comes with Git 2.7.4), but not on Arch Linux. The reason is that the warning was removed in Git 2.8 (March 2016):
Across the transition at around Git version 2.0, the user used to get a pretty loud warning when running "git push" without setting push.default configuration variable. We no longer warn because the transition was completed a long time ago.
So you won't see the warning if you have Git 2.8 and later and don't need to set push.default
unless you want to change the default 'simple'
behavior.