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 GitHub Basics Working By Yourself Push Your Project to GitHub

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

push origin

By my understanding if you push some files to your repo but you don't specify the repo it defaults to origin, right?

git push origin master

So if I wanted to specify one I'd use

git remote add this_is_my_repo_name https://github.com/username/reponame.git
git push this_is_my_repo_name master

I've been practising more with Git and just want to be sure I've got this right :)

2 Answers

Karolin Rafalski
Karolin Rafalski
11,368 Points

Yeah! looks good. You can always check your remotes with git remote -v

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Awesome thanks I'll look at that next :)

I got myself lost in my first repo earlier on. I couldn't believe how much clearer everything was by simply making a new test repo. :-)