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 trialJacob Goh
2,470 Pointsencounter warning while pushing
encounter this while using 'git push'
warning: push.default is unset; its implicit value has changed in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the traditional behavior, 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.
Since Git 2.0, Git defaults 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)
What should i do?
4 Answers
Chris Freeman
Treehouse Moderator 68,457 PointsWhen pushing, git needs to know where you are pushing to. Do you have a remote defined? Use:
$ git remote -v
to see your remote connections. Use git remote add origin <URL>
to add the connection. See adding a remote
Andrea Cognini
8,459 PointsTry to push on remote like this
git push origin master
the word "master" is referred to the chosen <branch>
Jami Schwarzwalder
17,961 PointsI encountered the same problem and was able to change my global default.
git config --global push.default <option>
if you type in git help config
you can see what options are available.
Edgar Lizcano Sosa
Courses Plus Student 11,152 PointsIt's kinda late but if someone else is looking for an answer here's a quick explanation from a stackoverflow link