Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Git Basics Getting Started With Git Working With Git Repositories

Is git on our system is origin or remote?

This is confusing, I cannot understand what is origin or what is remote. So what is origin and what is remote. On my system can i say it is origin as git originated from my system?

Timothy Schmidt
Timothy Schmidt
4,806 Points

I didn't see anything in the video about this. Are you referring to this command?

git remote add origin path_to_repository

If so, git remote add is the command. It configures a connection to a remote repository which is located at path_to_repository. origin is the name given to the connection. You could name it anything you want, origin is just commonly used in the tutorials so a lot of people end up using it.

Origin an alias to a remote git repository. Typically it's the repository that you cloned from. If you created a local repo with 'git init', there isn't an origin alias.

Compare your output from 'git remote -v'

If you wanted to add a remote repository later, named 'origin' or something else, look at 'git remote add'

1 Answer

For me the reference to 'origin' has always been somewhat a misnomer, though a lot of folks only work with one "Origin" repo server.

I tend to name my references for whatever server/service I am adding that remote for in the remote command.

for instance my bitbucket I use my bb

git remote add mybb {bitbucket/connection/url}

or for my github i use 'mygh'

git remote add mygh {github/connection/url}

then I can push:

git push mybb master

or git push mygh master

Lawrence Francell This seems to be a good way to remember and you are right, 'origin' is too confusing,