Skip to main content

Sign in

Save your progress and access it from any device.

Or with email

Don't have an account?

Privacy policy

Git remote: manage remote repositories

A remote is a link to a remote repository (GitHub, GitLab...). Learn how to add, manage and use remotes to collaborate with your team.

Origin and upstream: the two key remotes

origin

The main remote repository. When you clone a project, the remote is automatically named "origin". This is where you push your commits.

Automatically created by git clone

upstream

The original repository when working on a fork. Lets you pull updates from the source project with git fetch upstream.

Must be added manually with git remote add

Git remote in practice

View, add and manage remote repositories.

View and add

Manage remotes

Essential remote commands

git remote -v

List remotes with their URLs

git remote add <name> <url>

Add a new remote

git remote remove <name>

Remove a remote

git remote rename <old> <new>

Rename a remote

git remote set-url <name> <url>

Change a remote's URL

git remote show <name>

Detailed info about a remote

Part of the Git Remote & Collaboration guide

A

GitQuest is created by Anaïs (nouvelle fenêtre), web developer and head of education, specializing in tech training and digital accessibility.

Questions about git remote

Practice remotes in GitQuest

GitQuest investigations simulate working with remote repositories in a safe environment.

Start practicing now