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.
Works in GitTree Free: every local Git feature, once you are signed in.
On this page
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….
| Action | macOS | Windows and Linux |
|---|---|---|
| Fetch All | ⌘⇧F | Ctrl+Shift+F |
Steps
Add a remote
Choose Add Remote…. Type a Name, such as
originorupstream, and the URL.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.
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.