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 trial

Development Tools Git Basics Working With Remote Repositories Pushing and Pulling

Arikaturika Tumojenko
Arikaturika Tumojenko
8,897 Points

Git push without the target repository name - Git throws and Error but in the Treehouse workspace it works. Why?

In the video, Tommy writes the following code

git push

without using the targeted repository (which was origin in this case) or the name of the branch he was trying to push. The code worked just find but when I tried to replicate the same command in my console (Bash for Ubuntu for Windows), I got an error.

"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"

After specifying the origin repository and the branch's name, everything worked just fine. Why?

Thx.