Skip to content
Versora

Manual

Stacks

STACKS section and marks in the graph

5 min read

On this page

The STACKS section of the left panel shows each stack in the repository with its branches in order, the lowest one first. At a glance you see each branch's merge request, whether it was approved, the pipeline, which branches need a rebase because their parent moved and what hasn't been pushed yet.

The section only appears when the repository has at least one stack. It stays collapsed or expanded the way you left it, when you click the header.

Section header

ElementWhat it does
STACKS and the numberHow many stacks the repository has. Click to collapse or expand the section.
+ button"New stacked branch on the current one". It's disabled on a detached HEAD.
Right-click on the headerMenu with New stacked branch on feature/a… (the current branch).

The left panel filter (Ctrl+Alt+F) also applies here: only the stacks with a branch whose name contains the text remain. With none, you see "No stack branch matches that name.".

Header of each stack

Each stack has a header row with its name (the lowest branch, or the glab stack title) and "on main", the main branch. The tooltip shows "Stack feature/a: 3 branches on main".

The buttons only appear when there's something to do:

ButtonTooltipWhen it appearsPage
Down arrow"Update the stack from the server (fetch + pull of each branch)"a branch of the stack is already on the remoteUpdating the stack from the server
Restack"Restack (a branch's parent moved)"a branch needs a rebaseRestacking
Push"Push the stack (some branches aren't on the remote)"a branch differs from the remotePushing the stack
Cloud (icon only)"GitLab (server version) also shows this stack in each merge request header…" or "GitHub also shows this stack (stacked pull requests)…"the server recognizes the stackStack merge requests

The buttons act from the current branch, if it's in the stack; otherwise, from the lowest one.

Right-clicking the stack header opens the stack menu: Restack, Update the stack from the server, Push the stack…, the merge request items, View the whole stack's changes and New stacked branch on feature/a…

Warnings inside the stack

  • When the lower branch was already merged into the target, a green bar appears: "!10 (feature/a) was merged into main." (or "feature/a was merged into main.", without a merge request), with the Sync button. See Syncing the stack.
  • When a restack stopped on a conflict, you see at the top of the section: "Restack stopped at feature/b. Resolve the conflicts and use Continue or Abort in the changes panel."

Branch rows

Each branch of the stack is a row, indented a little more at each position.

MarkMeaning
✓ in the marginIt's the current branch ("Current branch").
2/3Position in the stack, bottom to top.
NameThe local branch.
!11 (or #11 on GitHub)The branch's open merge request. The tooltip shows the title.
draftThe merge request is marked as a draft.
✓ 1/2, ✓ 2Approvals: given and required. Green when they're enough.
± 1Reviews requesting changes.
mergedThe branch was already merged into the target. Tooltip: "Already merged into main: sync the stack."
restackThe parent moved. Tooltip: "feature/a moved (2 commits this branch doesn't have): restack."
⚠The recorded parent no longer exists. Tooltip: "The branch below (feature/x) no longer exists: use "Stack on…" to pick another."
localThe branch isn't on the remote yet ("Not on the remote yet.").
↑The branch is on the remote, but differs from it ("Differs from the remote: needs a push.").
Worktree iconThe branch is checked out in another worktree ("In use in the worktree …").
Pipeline iconThe state of the merge request's pipeline. See Pipeline indicators.

The row's tooltip puts it all together: "feature/b: 2 of 3, on feature/a", the restack warning, the stack's source (git-town, glab or implicit) and the keys.

Mouse and keyboard

  • Click: selects the branch tip in the graph.
  • Double-click: checks out the branch (on the current branch it does nothing).
  • Right-click: the full branch menu, with the Branch stack submenu.
  • Drag a row above or below another one: reorders the stack (see Changing the stack structure).
  • Keyboard: the rows are part of the panel tree. The arrows move, Enter selects, and Shift+F10 (or the Menu key) opens the menu. The row's tooltip reminds you: "Enter selects · double-click checks out · Shift+F10 opens the menu".

The "Branch stack" submenu

In the menu of any local branch, the Branch stack submenu gathers the actions. On a stacked branch, the title shows the position: Branch stack (2/3). The items, in order:

  1. New stacked branch on feature/b… and Stack feature/b on…
  2. Restack, Update the stack from the server and Push the stack…
  3. Sync the stack (feature/a was merged)…, when the lower one was already merged into the target.
  4. Create stack merge request for feature/b… (or "This branch already has !11") and Update the navigation in the merge requests.
  5. Merge the stack up to feature/b… and Get the stack from the server (from !11)…
  6. Record the stack in Versora, for stacks from another source.
  7. On the current branch: Check out the branch below and Check out the branch above.
  8. Move up in the stack, Move down in the stack, Fold into feature/a… and Split feature/b…
  9. View the branch's changes (since feature/a) and View the whole stack's changes.
  10. Remove feature/b from the stack.

On a branch that isn't in a stack, the submenu only has New stacked branch on…, Stack … on… and Split …. The merge request items only appear with GitLab or GitHub set up; on GitHub the text says "pull request".

Marks outside the section

In the graph

The label of a stacked branch gets the 2/3 badge. The tooltip is "Stack feature/a: 2 of 3".

In the MERGE REQUESTS section

The merge request row gets the Stack 2/3 chip ("Stacked merge request: 2 of 3"). Clicking the chip opens a menu with Get the stack of !11… and Merge the stack up to !11… See Merge requests panel.

In the merge request review

Right below the review title is the stack navigation: "Stack !10 → !11 → !12", with "2 of 3", the ← Previous and Next → buttons (they open the neighbor's review) and the Get the stack and Merge up to here… buttons. A stack branch that doesn't have a merge request yet appears by name, with the tooltip "feature/c has no merge request yet". When the server recognizes the stack, the "also on GitLab" (or "also on GitHub") badge appears. See Merge request review.

Caveats and messages

  • The 2/3 badge and the section read the stack from the local config and from the merge requests. After you create a merge request, the server list is read again and the marks adjust.
  • A branch in use in another worktree isn't rebuilt by the restack: restack from there, or close the worktree.

The section has no preference of its own. What it shows about merge requests and pipelines depends on the token in Git servers (see Git servers).

See also