Reputation: 9309
When i do git push, i got an error, but commit is do fine:
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)
What i need to do?
Upvotes: 1
Views: 252
Reputation: 6294
You do not get an error but a warning. Git itself suggests what you can do. I recommend to use that configuration:
git config --global push.default simple
because that is less confusing. With that configuration, a git push
without refspecs will only push one reference: it will push the current branch to its upstream branch, but but refuses to push if the upstream branch’s name is different from the local one (I quote the manual page of git-config itself).
Upvotes: 4