Git – What is the difference between push.default “matching” and “simple”

I have been using git for a while now, but I have never had to set up a new remote repo myself and I have been curious on doing so. I have been reading tutorials and I am confused on how to get “git push” to work.

If I simply use git push it asks me to see up a default branch(?) to point to? What is the difference between these two options it supplies me with?

git config --global push.default matching
git config --global push.default simple

Matching just pushes whatever branches I have on my local repo, and if they don’t match I have to then manually tell it to push whatever new local branches I have, correct? Is this best practice to use or is simple best?

3 Answers
3

Leave a Comment