Remote repos

Sharing your version history through a server

Remote repositories in Git are repositories stored elsewhere than on your computer, usually on a site like GitHub or a private enterprise server for your company. Remote repositories have a few key purposes:

  1. Remote repositories are the mechanism by versions can be shared between computers, e.g., between a lab and home computer or between the computers of multiple teammates collaborating on code.
  2. Remote repos maintain a copy of your version control history so that if disaster strikes your computer, you have a backup of your project.

Remote repositories are a hub to which multiple local repositories are linked. They function the same as a local repo, but the user takes extra steps to share changes with the remote and to retrieve changes, perhaps made by teammates, from the remote.


Scenario 1 - Sharing a new project

You make a new project on your computer that you want to save to GitHub

git push

Manually sending changes from the local to the remote

Scenario 2 - Clone an existing project

The remote already exists and you want the project

Scenario 3 - Retrieving changes

Manually retrieving sending changes from the remote to the local

Last modified November 7, 2024.