V
V
vrazbros2019-04-13 20:55:58
git
vrazbros, 2019-04-13 20:55:58

Which is better to use git push simple or matching?

I did git push -u origin master
then I do git push message:
warning: push.default is not set; its implicit value was changed in Git version 2.0 from "matching" to "simple". To stop this message and keep the old behavior, use:
git config --global push.default matching
To stop this message and use the new behavior, use:
git config --global push.default simple
When push.default is set to "matching , git will push local branch changes to existing external branches with the same name.
Starting with Git version 2.0, the default is the more conservative "simple" behavior, which pushes the current branch's changes to the appropriate external branch, from which "git pull" pulls the changes.
See "git help config" and search for "push.default" for more information.
(the "simple" mode was introduced in Git version 1.7.11. Use the similar mode "current" instead of "simple" if you sometimes use older versions of Git)
I can't figure out the difference between matching and simple. Both options push changes to existing external branches. So what's the difference? And which option are you using?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2019-04-14
@vrazbros

simple or current
matching was a very unfortunate default. It pushes ALL changed branches and in 99% of cases it's not what the developer wanted

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question