Hygiene and workflow
Archive branches
5 min read
Not every old branch can be deleted: sometimes it holds an experiment, a demo version or work that hasn't been merged yet. Archive gets the branch out of the way without deleting anything. It leaves the LOCAL and REMOTE sections and the graph and only appears in the ARCHIVED section of the left panel, from where it comes back with one click.
Archiving isn't a git operation. The branch stays intact in the repository and on the server. Versora just puts it in the graph's "hide" filter (the same as each branch's eye in the panel) and keeps, on this machine, the list of archived branches for each repository.
- Menu: right-click a branch (local or remote) in the panel or on the graph label › Archive branch. On the current branch, the item shows as Archive branch (not for the current branch), disabled.
- In the Branches review: check the branches and click Archive (N), right-click a row or press A.
- Right-click the
experimento/cachebranch › Archive branch. - The notice confirms: "experimento/cache was archived: it left the panel and the graph." With several, it says "5 branches archived: …".
- The branch moves to the ARCHIVED section, which shows the count in its header.
Nothing. No git command runs, no branch is deleted and nothing goes to the server. That's why archiving only applies on this machine: your colleagues keep seeing the branch normally.
The archiving notice has the Undo button, which unarchives right away. Since archiving isn't a git operation, it does not go into the Ctrl+Z stack. Once the notice is gone, use Unarchive (below).
- "feature/x is the current branch and can't be archived.": a branch in use doesn't get hidden. Check out another branch first.
- "3 branches weren't archived: the graph filter reached the limit of hidden references (Windows limits the command length). Delete the merged ones with the branch cleanup.": there's a cap on the number of hidden branches. Use Branch cleanup to delete the ones already merged, and the room comes back.
- ARCHIVED section: the "Unarchive feature/x" button on each row.
- ARCHIVED section: right-click the header › Unarchive all (N) (or Unarchive the branch, when there's only one).
- The archived branch's menu (right-click its row in the ARCHIVED section) › Unarchive branch.
- In the Branches review: Archived › Only them filter (or Show), check and click Unarchive (N), or press A.
- Palette (Ctrl+P): "Show archived branches" opens the review with only them.
- Open the ARCHIVED section in the left panel.
- Click the row's unarchive button.
- The notice confirms: "feature/x is back in the panel and the graph.", with Undo to archive it again.
The branch comes back exactly as it was before being archived: if it was already hidden in the graph by the eye before archiving, it stays hidden.
An archived branch comes back on its own to the sections and to the graph when:
- it gets new commits (someone continued the work and you fetched); or
- it becomes the current branch (you checked it out, for example by double-clicking it in the ARCHIVED section).
The notice explains: "feature/x has new commits (or is checked out) and left the archive." With several: "3 archived branches had activity and came back: …".
If an archived branch is deleted and then restored with Ctrl+Z on the same commit, it stays archived.
| Element | What it does |
|---|---|
| ARCHIVED header and the count | Click to open or close the section. |
| "Review the archived branches" button | Opens the Branches review showing only the archived ones. |
| Right-click the header | Review the archived branches and Unarchive all (N). |
| A branch's row | The tooltip says when and how it was archived ("archived on 11/10/2026" or "archived by the rule on 11/10/2026"). Double-click checks it out (and the branch comes back from the archive). Right-click opens the branch's normal menu. |
| Each row's button | "Unarchive feature/x". |
The section respects the panel's branch filter. With no archived branch passing the filter, "No archived branch matches this filter" appears.
You can let Versora archive a repository's stale branches on its own. The rule runs when the repository opens and after each fetch, in the background, at most once every 10 minutes. It only archives: it never deletes anything.
- Preferences › Branch hygiene › Automatic archiving, with the repository open in the active tab.
- In the Branches review footer: Configure… (opens that page) and Apply now….
- Open the repository and go to Preferences (Ctrl+,) › Branch hygiene.
- Under Automatic archiving, turn on Archive automatically in loja-web (the repository's name appears in the text).
- Adjust Stale for at least (days) and the other options.
- To see the effect before waiting for the next fetch, click Apply now…. The confirmation lists the branches: "Archive 4 branches by the rule?" and "They leave the panel and the graph (nothing is deleted; you can unarchive them at any time): …". Confirm with Archive 4 branches.
- When the rule runs on its own and archives something, the notice says "The rule archived 2 branches: …", with View, which opens the review with only the archived ones.
| Option | What it does | Default |
|---|---|---|
| Archive automatically in (repository) | Turns the rule on in this repository. | off |
| Stale for at least (days) | "Last commit older than this." Accepts 1 to 3650. | 90 |
| And merged into the base | Only archives the ones already merged into the base, "Including squash, when the server reports the merge request." | on |
| Also apply to remote branches | "Off: local branches only." | off |
| Apply the rule now › Apply now… | "Shows the list before archiving." | — |
The base is the same one chosen in the Branches review for the repository (or the automatic one).
"Never the current branch, main branches, protected ones, ones in another worktree, favorites or the pinned one." Favorites are the branches marked with the star, and the pinned one is the one in Pin to Left in the graph. A branch you unarchived by hand also isn't archived again by the rule while it stays on the same commit.
- "No branch matches the rule right now.": the answer from Apply now… when there are no candidates.
- "Open a repository to configure its rule.": the rule is per repository; open it in a tab first.
- Preferences › Branch hygiene: the archiving rule (per repository), the "stale" threshold and the badge in the panel.
- Preferences › Checks: the protected branches, which the rule never archives.
- The administrator can hide or lock the Branch hygiene page (id
hygieneinpreferences_hidden/preferences_locked) and define protected branches for everyone (protected_branches). See Policy keys.