Branches and remotes
Fetch and automatic fetch
3 min read
Fetch downloads the new commits, branches and tags from the server, but doesn't touch your local
branches or your files. After it, the remote branches (origin/main, origin/feature/…) show where
the server is, and your branches' ↑/↓ counters show how far ahead or behind you are. To bring what's
new into your branch, use pull.
- The repository bar: the Fetch button (tooltip: "Fetch all remotes").
- The repository bar: the arrow next to Pull (Pull options) › Fetch all remotes.
- Palette (Ctrl+P): "Fetch" (detail: "Fetch all remotes").
- Click Fetch.
- The bar shows "Fetching…", git's phase (for example, "Receiving objects" or "Resolving deltas") and the percentage. Cancel interrupts it.
- At the end, the graph and the left panel already show the updated remote branches.
git fetch --all --prune --tags
--all: fetches from all the repository's remotes.--prune: deletes the remote branches that no longer exist on the server (for example, after merging a merge request that removed the branch). A local branch whose upstream disappeared then shows the gone badge.--tags: also brings the tags.
- REMOTE section: the remote's menu (right-click
origin) › Fetch origin.
git fetch --prune --tags origin
The bar shows "Fetching origin…".
With automatic fetch on, Versora fetches on its own, every so often, in the active tab's repository. That way the ↑/↓ counters, the remote branches and conflict prediction stay up to date without you clicking anything.
- Preferences (Ctrl+,) › General › Remotes › Auto-fetch.
| Option | What it does | Default |
|---|---|---|
| Fetch automatically | Turns background fetch on and off. | on |
| Auto-fetch interval, in minutes | Time between one fetch and the next (from 1 to 1440). | 5 minutes |
Below the options, a line shows the state in the open repository: "Last auto-fetch in app: 14:32.", "No auto-fetch in app yet this session." or "Last attempt in app: 14:32 — failed."
- It only runs with the Versora window in focus and no other operation in progress in the repository. It also waits when a dialog or menu is open, when the repository has no remote and when a merge or rebase is stopped midway.
- It doesn't touch your files or your branches: it's the same
git fetch --all --prune --tags. - It doesn't ask for a password and doesn't open a login window. Without a credential, it simply fails.
- It doesn't notify you when it works. While it runs, the bar shows "Auto-fetch…".
- Each automatic fetch has up to 2 minutes. If the server hangs, it's interrupted so it doesn't keep the repository busy.
Network failures (no connection, no VPN, server down) don't produce a notice: the fetch tries again at the next interval. For other failures, the notice "Auto-fetch for "app" failed:" shows up once, with the reason and the note "This warning won't repeat while the failure continues. Auto-fetch can be turned off in Preferences › General." When the reason is a credential, the notice also suggests adding the server in Git servers.
Fetch doesn't go into the undo history: it doesn't change your branches or your files.
- "Tip: add this server's credential under "Git servers" (key icon).": the server refused the authentication. Register a token for the host (see Git servers).
- Certificate or proxy errors come explained in the notice, sometimes with the fix ready (see Network and updates).
- "your company's policy doesn't allow the server …": the remote points to a server outside the
company policy's
allowed_serverslist. - "Wait for the current operation to finish.": another operation is running in this repository.
- Shallow clone: to fetch more history, use "Fetch more history (shallow clone)…" in the palette (see Shallow clone and partial clone).
- Preferences › General › Remotes › Auto-fetch.
- Proxy and certificates used by git: Preferences › Network (see Network and updates).
- Company policy:
allowed_serversapplies to every git network command (see Administrators).