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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Y B](https://secure.gravatar.com/avatar/5348b0e0bfb39b54514e90489610a40f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Y B
14,136 PointsChallenge: git push branch to remote repository
In the git tutorial I can get past the challenge where it asks to push to a remote repository
Q: 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?
My answer: git push git://mygithosting.com/git_basics/cool_stuff.git. awesome_stuff
However this fails, but I'm not sure why?
3 Answers
![Ken Alger](https://secure.gravatar.com/avatar/cf2cad7e6e37acacfa5201068856ed3d?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ken Alger
Treehouse TeacherY B;
Once you have cloned a repository Git recreates a remote named origin
for us. So, we would need to use:
git push origin awesome_stuff
Which does just what it sounds like, it pushes our awesome_stuff
branch back to the origin, which Git knows about.
Post back with further questions.
Ken
![Y B](https://secure.gravatar.com/avatar/5348b0e0bfb39b54514e90489610a40f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Y B
14,136 PointsThanks I thought that was a specific example in the tutorial not the general case. Does git always set it up as origin after cloning a repository?
![Ken Alger](https://secure.gravatar.com/avatar/cf2cad7e6e37acacfa5201068856ed3d?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ken Alger
Treehouse TeacherIf you take a look at the documentation for clone
you will see that:
This default configuration is achieved by creating references to the remote branch heads under
refs/remotes/origin
and by initializingremote.origin.url
andremote.origin.fetch
configuration variables.
Happy coding,
Ken
![Y B](https://secure.gravatar.com/avatar/5348b0e0bfb39b54514e90489610a40f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Y B
14,136 PointsThanks