A Git remote is a reference to a copy of your repository hosted elsewhere — GitHub, GitLab, Bitbucket, or your own server. This guide explains how to add, inspect, rename, and remove remotes, and how remote tracking branches work.
The Problem
You've initialized a local repository and written some commits, but you have no idea how to connect it to GitHub or push your work anywhere. Or you're trying to pull from a second remote and Git says it doesn't know where to look.
Remotes are the bridges between your local repository and the rest of the world. Understanding how to add, list, and manage them is essential for any collaborative workflow — whether you're pushing to GitHub, pulling from an upstream fork, or working with multiple team servers.
Common mistakes developers make with this:
Forgetting to add a remote after `git init`, then being unable to push
Confusing `origin` (your fork) with `upstream` (the original project)
Pushing to the wrong remote by accident
Not knowing that remote tracking branches like `origin/main` are just local snapshots
Gitoryx: Gitoryx lists all your remotes in the sidebar, shows their tracking branches in the commit graph, and lets you fetch, pull, or push to any remote in one click.
What is Remote: Connect Your Repo to a Remote Server?
A Git remote is a named reference to a repository hosted somewhere else — GitHub, GitLab, Bitbucket, or any server. The most common remote is `origin`, which Git creates automatically when you clone a repository.
Step-by-Step Guide
1
List existing remotes
Start by checking what remotes are already configured in your repo.
When working on a fork, `origin` is your copy, `upstream` is the original. Pushing to upstream (if you don't have write access) fails; pulling from origin instead of upstream misses new changes from the source project.
Fix: Always confirm with `git remote -v` before pushing or pulling.
Not fetching before checking remote tracking branches
`origin/main` is a local snapshot of the remote branch. It only updates when you fetch.
Fix: Run `git fetch origin` to update all remote tracking branches before comparing or merging.
Forgetting to set upstream when pushing a new branch
Git says 'The current branch has no upstream branch' when you try to push a branch for the first time.
Fix: Use `git push -u origin <branch>` the first time. The `-u` flag sets the tracking relationship.
Gitoryx — macOS, Windows & Linux
Manage all your remotes visually in Gitoryx
Remotes and their branches appear directly in the commit graph
Add, rename, or remove remotes from the sidebar — no CLI needed
Fetch all remotes at once with a single click
See at a glance if your branch is ahead or behind origin
`origin` is the default name Git gives to the remote from which you cloned. It's just a shorthand alias for the full remote URL. You can rename it or have multiple remotes with different names.
What is the difference between `git fetch` and `git pull`?
`git fetch` downloads new data from the remote and updates remote tracking branches (like `origin/main`) but does not change your local branch. `git pull` does a fetch followed by a merge (or rebase) into your current branch.
Can I have multiple remotes?
Yes. You can add as many remotes as you need. Common setups include `origin` (your fork) and `upstream` (the original project), or multiple deployment targets.
How do I push to a remote for the first time?
Use `git push -u origin <branch-name>`. The `-u` flag sets the tracking relationship so future `git push` and `git pull` commands know which remote branch to use.
Everything in this tutorial is faster and clearer with a visual Git client. Gitoryx is free, runs natively on macOS, Windows, and Linux, and built for developers who want to move fast without breaking things.