Skip to content
Versora

Manual

Branches and remotes

Remotes

3 min read

On this page

A remote is a nickname for the address of another repository, usually the project on the server (origin). A repository can have several: in a fork, it's common to have origin (your fork) and upstream (the original project). The left panel's REMOTE section lists the remotes and, inside each one, the remote branches.

The REMOTE section

  • Each remote shows up as a folder with its branches. The tooltip shows the URL and reminds you: "Drag a local branch here to push it".
  • The + in the header (tooltip: "Add remote") opens the add dialog.
  • With no remote, the section shows "No remotes configured" and the Publish to server… button (see Publish repository).
  • Double-clicking a remote branch checks it out (see Checkout).

The remote menu

Right-click the remote's name:

ItemWhat it does
Fetch originFetches from this remote only (see Fetch).
Edit origin…Changes the name and the URL.
Copy remote URLCopies the URL (notice "URL copied").
Open origin in the browserOpens the project's page. It shows up when the web address can be built from the URL (HTTPS or SSH).
Cleaning up branches that were already mergedSee Hygiene and flow.
Hide all branches of origin / Show all branches of originRemoves this remote's branches from the graph or puts them back (see Graph).
Add remote…Opens the add dialog.
Remove origin…Removes the remote from this repository.

Add remote

Where to find it

  • The + in the REMOTE section header.
  • A remote's menu: Add remote….
  • Palette (Ctrl+P): "Add remote…".
  • Push in a repository without a remote opens this dialog when there's no GitLab or GitHub registered.
  • In the Publish repository dialog: Add an existing remote….

Step by step

  1. Open Add remote.
  2. In Name, leave origin (the default) or type another one, such as upstream.
  3. In URL, paste the address (https://… or git@…), for example https://gitlab.exemplo.com/equipe/app.git.
  4. Click Add. The bar shows "Adding remote…" and then Versora fetches right away to list the new remote's branches.
FieldWhat it isDefault
NameThe remote's nickname.origin
URLThe repository's HTTPS or SSH address.empty (required)

What Versora does in git

bash
git remote add upstream https://gitlab.exemplo.com/equipe/app.git
git fetch --all --prune --tags

Edit (rename or change the URL)

Step by step

  1. The remote's menu › Edit origin….
  2. In the Edit origin dialog, change the Name and/or the URL.
  3. Click Save. If nothing changed, nothing happens.

What Versora does in git

bash
git remote rename origin gitlab        # if the name changed
git remote set-url gitlab [email protected]:equipe/app.git

Renaming the remote also renames the remote branches (origin/main becomes gitlab/main) and adjusts the local branches' upstream.

Remove remote

  1. The remote's menu › Remove origin….
  2. The Remove remote dialog asks: "Remove remote "origin" and its remote-tracking branches? The remote repository itself isn't affected."
  3. Click Remove.
bash
git remote remove origin

The local branches stay, but the ones that tracked this remote's branches are left without an upstream.

Which account the remote uses

When you have more than one account on the same server (personal and work, for example), each remote uses the right account on its own, or the one you choose. The choice applies to fetch, pull and push. See Accounts.

How to undo

Adding, editing and removing a remote change the repository's configuration and the remote branches, which Versora's Ctrl+Z doesn't track: it restores branches, tags, HEAD and stashes. So these actions usually aren't added to the undo history, and a Ctrl+Z right after undoes the previous operation, if there is one. The exception is the fetch that comes with Add: if it brings new tags, the operation is added as "Add remote ‹name›", and Ctrl+Z deletes only those tags; the remote and its remote branches stay. To go back, edit, add or remove the remote again from the same menu.

Caveats and messages

  • "Enter the remote's name and URL.": both fields in the edit dialog are required.
  • A name that already exists is refused by git: choose another name.
  • A fetch failure right after adding (credential, certificate, proxy): the remote was added anyway. Fix the access and fetch again.
  • "your company's policy doesn't allow the server …": the URL points to a server outside the company policy's allowed_servers list.

See also