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 Remote Work

Bummer! Since we're pushing a new branch, you have to specify what branch to push.

Hey, I'm doing an exercise where you have to push to a remote repository. The first step is to add a remote with a specific url provided (I passed the task), and the second task was to push to that repo.

Upon entering: git push <git repo url> <branch name> I got the error in the topic of this message. I'm sorry but I passed the exercise and can't go back to check on it now. The solution was to use origin in place of the repo url. I still have no idea why it didn't work with the actual url.

Can't really figure out what I'm doing wrong, both the remote url and branch name are specified, and the documentation I found here: https://help.github.com/articles/pushing-to-a-remote/ says that's all that's needed.

What am I missing?

2 Answers

The question was: Now that you've cloned that repository, let's say you've done some work on a branch named "awesome_stuff." What command would you run to push that branch up to your remote?

the answer is

git push origin awesome_stuff

origin is the the remote repository, it takes care of the http: blah blah blah, and the awesome_stuff is whatever branch you're currently checked out on.

What command are you entering? Which exercise?

sry, thought my code would get added. Edited main post from memory, since I can't figure out how to delete it (passed the exercise, answer in the post).