How to Fix Git push warning: push.default is unset;

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

See ‘git help config’ and search for ‘push.default’ for further information.
(the ‘simple’ mode was introduced in Git 1.7.11. Use the similar mode
‘current’ instead of ‘simple’ if you sometimes use older versions of Git)

Everything up-to-date


Here’s the difference between push.default matching and push.default simple.

The push.default setting maching means that git push will push all your local branches to the remote host with the corresponding name. This means that you might inadvertently push some branches that you didn’t intend to push.

Setting push.default to simple means that git push only pushes the branch you are currently on to the branch you pulled from git pull in the first place, and it also checks to see if the names of the branches are the same.


Similar Posts: