Skip to content
GitTree
Remotes and sync

Add and edit remotes

A remote is a named copy of the repository elsewhere, such as origin on GitHub. The Remote section of the left panel lists them; Add Remote… adds one, and right-clicking a remote edits, fetches, prunes or removes it.

FreeUpdated

Works in GitTree Free: every local Git feature, once you are signed in.

On this page
  1. Before you start
  2. Where to find it
  3. Steps
  4. Expected result
  5. Edit, prune or remove a remote
  6. If something goes wrong
  7. Questions
  8. Related

Before you start

  • A repository is open, and you have the remote’s URL (HTTPS or SSH).

Where to find it

  • The Remote section of the left panel; Add Remote… from its menu or the command palette.
  • Right-click a remote: Fetch Remote, Prune Remote, Edit Remote…, Copy Remote URL, Remove Remote….
ActionmacOSWindows and Linux
Fetch All⌘⇧FCtrl+Shift+F

Steps

  1. Add a remote

    Choose Add Remote…. Type a Name, such as origin or upstream, and the URL.

  2. Set a separate push URL, if you need one

    Push URL stays Same as the URL unless pushes should go elsewhere, such as an SSH URL while fetching over HTTPS.

  3. Save and fetch

    Press Add Remote, then fetch: the remote’s branches appear under it in the left panel and in the graph.

Expected result

The remote is listed with its branches, ready to fetch from, pull from and push to.

Edit, prune or remove a remote

  • Edit Remote… changes its name, URL or push URL.
  • Prune Remote removes remote branches that were deleted on the remote.
  • Remove Remote… removes it from this repository with its remote-tracking branches. Nothing on the remote changes, and adding it back and fetching restores them.

If something goes wrong

“Enter a name and a URL.”

Both are required. Copy the URL from your host’s Clone or Code button.

Fetching from the new remote fails

Check the URL, and that your credentials or SSH key work for that host (choose remote credentials).

Questions

What is the difference between origin and upstream?

Only convention. origin is usually where you cloned from and push to; upstream is the original project when you work on a fork.