🎓 A1Learner
🔍
0 of 50 lessons completed

What Is a Remote

A remote is a copy of your repository on another machine. It lets you share work and keep a backup away from your computer.

Add a remote

The add command prints nothing. The list shows the new remote.

$ git remote add origin ../remote.git
$ git remote

See the addresses

Each remote shows two lines, one for each direction.

$ git remote -v

Example

$ git remote add origin ../remote.git
$ git remote
$ git remote -v

Key points

  • The usual remote is called origin.
  • Origin is only a name. It points at an address.
  • The address can be a web address or a folder.
  • This course uses a practice remote in a folder next to the project.
  • On GitHub, the address is a web address instead.
  • Remote names the place. GitHub is one place that hosts remotes.
  • The remote command lists the remotes you have.
  • The -v form prints the address of each remote.

Here, one remote is added and listed. Its address is the practice folder next to the project. On GitHub, the address would be a web address.

Note

Nothing leaves your computer yet. Sending work comes in the next lessons.

Try it Yourself

Edit the code, then press Run.

Running is simulated

Exercise

What is a remote?