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

Android Sending Projects to GitHub

Jerry Yu
PLUS
Jerry Yu
Courses Plus Student 5,033 Points

Github Remote Name

When sharing project on GitHub through Android Studio, there is a new field called remote name and it is default to origin. What is a remote name and how is it different from the repository name?

Can I use whatever name I prefer for the remote name?

Thanks,

2 Answers

Seth Kroger
Seth Kroger
56,413 Points

The remote name is a short-hand label for a remote repository. "origin" is the conventional default name for the first remote and is usually where you push to when you don't specify a remote for git. You can set up more than one remote for your local repo and you use the remote name when pushing to them. For instance you could set up a second copy of the repo on Bitbucket and refer to it with the remote name "bitbucket". Then pushing to origin would push and changes to GitHub, and pushing to bitbucket would push those same changes to BitBucket.