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

why my git wont push into my new repo with url?

I am not sure how it work the problem is that i m trying to push a file called facebookicon.html into my new repo i created one. i copy the url https://github.com/ironheartbj18/facebook-icontest.git. it wont let me to push why is that ? what did i wrong? after that also i would like to push some css, img , js into my new repo .

here the pic https://twitter.com/vanvlymenpaws/status/489307788732936192/photo/1

please help me thanks you

2 Answers

Samuel Webb
Samuel Webb
25,370 Points

In the terminal, navigate to your folder and try the following code:

git remote set-url origin "https://github.com/somegitrepo.git"

Replace 'somegitrepo' with the name of your repo. After that, try to git push again and see if it works.

The Git Shell version on Windows requires a slight variation on the command. If you just substitute the git remote add origin [url] with this instead!