Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "git remote" mean?

Tags:

git

git-remote

What does "remote" mean? When cloning a repository located at a central location, aren't we creating its remote version?

When I execute the command

$ git remote 

I get origin. What does this mean?

When I execute

$ git branch -r 

I get origin/master. Now what is this?

like image 679
Sandbox Avatar asked Jan 02 '14 18:01

Sandbox


1 Answers

I found a fantastic answer here:

As you probably know, git is a distributed version control system. Most operations are done locally. To communicate with the outside world, git uses what are called remotes. These are repositories other than the one on your local disk which you can push your changes into (so that other people can see them) or pull from (so that you can get others changes). The command git remote add origin [email protected]:peter/first_app.git creates a new remote called origin located at [email protected]:peter/first_app.git. Once you do this, in your push commands, you can push to origin instead of typing out the whole URL.

I would recommend reading the whole answer.

like image 99
Popeye Avatar answered Oct 11 '22 00:10

Popeye