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

Luke Kennedy
Luke Kennedy
2,559 Points

Error message when pushing.

I got the following error when pushing.

Could someone help explain this?

I'm running Terminal on Mac OSX


```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)

fatal: The current branch new_feature_test has no upstream branch. To push the current branch and set the remote as upstream, use

git push --set-upstream origin new_feature_test ```

1 Answer

It seems you are working on a feature branch so not the master branch, which is perfectly normal.

Try this:

git checkout master
git merge whateverbranchyouwereworkingon
git push

Of course this mean you are pushing master branch and not the branch you were working on. The branch you were working on is not on the remote server.

Correct me if I am wrong.

Good luck.