Skip to content

Remote

In one line

A remote is a named reference to a repository hosted elsewhere (e.g. on GitHub) that you can push to and pull from.

In simple words

A remote is a pointer to a version of your repository that lives on another server — most commonly GitHub, GitLab, or Bitbucket. Your local repository can have multiple remotes, each with a name. The default remote created by git clone is called origin.

Remotes are how local and server copies stay in sync. git push sends your local commits to a remote; git pull fetches and merges commits from a remote into your local branch. Without a remote, your repository is isolated on your machine.

You can add remotes with git remote add <name> <url>, list them with git remote -v, and remove them with git remote remove <name>. A common setup is origin pointing to your fork and upstream pointing to the original project you forked from.

Example

bash
# List configured remotes
git remote -v

# Add a new remote
git remote add upstream https://github.com/original/project.git

# Push to a specific remote
git push origin main

# Pull from upstream
git pull upstream main

origin is the default remote. You can add more (e.g. upstream) and push/pull from any of them.

Related terms

Related Resources

Related Lessons

Learn the fundamentals

Deepen your understanding with structured lessons on this topic.

View lessons

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary