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

Hosting the same project on two different repository sites?

Is it possible to host your repository on two or more sites like GitHub and Bitbucket at the same time, or does the 'git remote add origin' command for one site overwrite the command for the other. For example I have a repository hosted on Bitbucket that I created for another coding class. Could I host the same repository on GitHub and push to both when I need to?

1 Answer

Seth Kroger
Seth Kroger
56,413 Points

Yes, it's quite possible. You simple need different names for the remotes. "origin" isn't anything special, it's just considered by convention to be the name of the main remote. You can create other remotes with other names and then you would push to each one using the remote's name.