Published Sep 27, 2023Updated Sep 27, 2023
Contribute to Docs

Git remotes are copies of repositories that are not stored locally. Working with a remote often involves two copies or references:

  1. The forked repository (repo): By convention, these are named the origin remote which refers to the default repo.
  2. The base or home repo: The upstream remote refers to the remote repo that is being tracked for changes and contributions.


Remotes can be set with the git remote add command:

git remote add remotename remoteURL

Adding Remotes Using Docs

To manually set up the remotes, the forked repository would be named the origin remote:

git remote add origin

The base Codecademy/docs repo would be named the upstream remote:

git remote add upstream

Note: If the repository is cloned onto the computer, the remote defaults to origin. Additional set up would only be needed for the upstream remote.

Run the git remote -v (v flag is for verbose) command to check the list of remotes:

git remote -v
upstream (fetch)
upstream (pull)

All contributors

Looking to contribute?

Learn Git on Codecademy