Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJohn Coffin
10,359 PointsGit Push Default - Simple vs Matching
I'm seeing the following warning when pushing with Git:
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
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
In Git 2.0, Git will default to the more conservative 'simple' behavior,
which only pushes the current branch to the corresponding remote
branch that 'git pull' uses to update the current branch.
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)
My inclination is to change the default to 'simple' as this is what Git will use moving forward (and I don't have any old repositories, so it shouldn't be a problem). My concern is whether or not GitHub is 'simple push' ready.
Any thoughts?
1 Answer
Tommy Morgan
Treehouse Guest TeacherHey John Coffin -
This is a setting for how Git behaves on your machine, and won't affect (or be affected by) remote repositories in any way. So you don't have to worry about how GitHub is configured - whatever setting you choose here will be how Git works for you locally. This is one of the many advantages of having a decentralized repository structure - you don't have to worry as much about making sure everybody's configuration matches up :)
Sorry this is a few days late but hopefully it helps you out.