Skip to content
BENIBIX Learn

Remote Repository

Development🔀 Version ControlRemotes

Also known as Remote, Git Remote, origin

A shared copy of a repo on a server. The team swaps its work there.

Think of it like

Think of it like a shared shelf in the school hall. Everyone brings work there and takes the latest copy home.

Example

Emma adds a remote called origin that points to her team's server. Now her commits have somewhere to go.

Why it matters

A remote is how a team shares work. It is also a backup if your laptop dies.

Definition

A remote is a copy of your repository kept somewhere else, usually on a server. Your team pushes work to it and pulls work from it. Each remote has a short name, and the main one is usually called origin. Sites like GitHub and GitLab host remotes for you. Your own copy and the remote only match after you push or pull.

Example code

console
$ git remote add origin https://example.com/ada/shop.git
$ git remote -v
origin	https://example.com/ada/shop.git (fetch)
origin	https://example.com/ada/shop.git (push)
One remote named origin, used both to fetch and to push.

Common mistake

Thinking a commit is on the remote as soon as you make it. It stays on your computer until you push.

Key takeaways

  1. 1
    A copy elsewhere. Usually on a server online.
  2. 2
    Named origin. The main remote's usual name.
  3. 3
    Sync by hand. Push and pull keep it matched.

Learn it properly