Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

tui

An interactive, full-screen status: the branch tree on the left, the diff of the row under the cursor on the right, and loom’s actions one key away.

Usage

git loom tui

No arguments. The global --theme and --no-color options apply.

Layout

┌ Status ──────────────────────────────┐┌ Diff ─────────────────────────┐
│ ╭─ zz [local changes]                ││ diff --git a/src/main.rs ...  │
│ │   ma M  src/main.rs                ││ @@ -1,3 +1,4 @@               │
│ │╭─ fa [feature-a] ✓                 ││ +new line                     │
│ │●  pop  Add parser (2 files)        ││ ...                           │
│ ├╯                                   ││                               │
│ ●  9999999 (upstream) ...            ││                               │
└──────────────────────────────────────┘└───────────────────────────────┘
 Commit: c/C | Fold: f/F | Branch: b | Drop: d | Help: ? | Quit: q

The tree is the one git loom status -f shows, with the same short IDs. Commits start collapsed; open one to see its files.

KeyEffect
↑/k, ↓/jMove the cursor, or scroll the diff when it has focus
←/h, →/l, EnterClose / open the current row
TabSwitch focus between tree and diff
PgUp/PgDnScroll the diff by a page
Ctrl-← / Ctrl-→Narrow / widen the tree pane
MouseClick to focus and move, wheel to scroll
SpaceSelect the row (✓) and move down
+ (or =) / -One more / one fewer context commit before the base
R / F5Reload
LShow the action log
TShow the latest trace
?Show every key
EscCancel the current mode, else clear the selection. Never quits.
q / Ctrl-CQuit

Actions take the selected rows, or the row under the cursor when nothing is selected. A selection holds one kind of row: working files, commits, branches, commit files, or the [local changes] header.

Actions

KeyCommandWhat it does
ccommitCommit the selected files (or the [local changes] header for everything). The new commit appears in the tree: move it with ↑/↓ to the integration branch or any woven branch, then Enter. To commit to a new branch, create it with b first.
Cadd -p + commitPick hunks first, then place the commit as with c. What you pick is staged, so cancelling the placement leaves it staged.
ffoldFold the selection: move to a target with ↑/↓ — each tagged [AMEND], [MOVE] or [UNCOMMIT] — then Enter.
Ffold -pLike f, picking hunks first: working-tree hunks to amend into a commit, or a commit’s hunks to move or uncommit.
mfold --above/--belowMove a commit: ↑/↓ show it in each place it can go, Enter moves it there.
ssplitOn commit files: those files become the first commit. On a commit: like S.
Ssplit -pPick the hunks that become the first commit.
bbranchType the new branch’s name where it will appear: at the cursor commit or branch, else at the base.
aabsorbShow where each change would go, then absorb on confirmation.
ddropDrop the selected files, or the row under the cursor, after confirmation.
rrewordOn a commit: edit its message. On a branch: rename it in place.
MmergePick a branch to merge, local or remote.
UunmergeTake a branch out of the integration branch, after confirmation.
uupdateFetch and rebase onto upstream. On a pushed branch, a menu also offers to take the branch’s remote version, replacing its commits.
ppushPush a branch with its stack and open its pull request.
Ppush -fForce-push, after confirmation — for a push refused because the branch changed on the remote.

Actions run with the TUI still up. Questions appear as popups and menus, and only an editor (a commit message, a reword) takes over the terminal. When an action finishes, its result shows in the status bar, or an error popup opens, and the tree reloads. L shows each action’s full output.

Note

Git can’t ask for a password inside the TUI. If u or p need credentials, use a credential helper or ssh-agent, or run the command from a terminal once.

Conflicts

When an action pauses on a conflict — or when you open the TUI while an operation is paused — the tree gives way to the paused view. It lists the changed files, conflicts marked !!, and the diff pane shows conflict markers:

┌ Paused: loom fold — step 2/5 ────────┐┌ Diff ─────────────────────────┐
│ Conflicts — resolve them, stage each ││ <<<<<<< HEAD                  │
│                                      ││ old line                      │
│  !! src/main.rs                      ││ =======                       │
│  M  src/lib.rs                       ││ new line                      │
│                                      ││ >>>>>>> 1a2b3c4 Add parser    │
└──────────────────────────────────────┘└───────────────────────────────┘
 Continue: c | Abort: a | Stage: Space | Trace: T | Help: ? | Quit: q

Resolve the files in your editor, then:

KeyEffect
SpaceStage the file under the cursor and move to the next
cContinue
aAbort, after confirmation
R / F5Reload, after resolving outside the TUI

Prerequisites

  • On a branch with an upstream, as for status
  • An interactive terminal: the TUI is not available in agent mode