Git, diffs and merging
The Git view
Section titled “The Git view”Open it from the right panel (⌘J) or directly with ⌘⇧G. It has two lists:
- Uncommitted: changes since the last commit.
- Since base: everything the branch would bring into a merge, compared with the point where it left its base branch. The primary checkout only has Uncommitted.
Each file carries a status letter:
| Letter | Status |
|---|---|
| A | Added |
| ? | Untracked |
| M | Modified |
| T | Type changed |
| D | Deleted |
| R | Renamed |
| U | Conflicted |
The diff tab
Section titled “The diff tab”Click a file to open its diff in a tab. Diffs are inline and read-only, and they refresh while the tab is in front. F7 and ⇧F7 jump to the next and previous change. A conflicted file opens as the file itself, so you can resolve it.
Commit and merge
Section titled “Commit and merge”Press ⌘⇧M on the selected worktree, click the merge button on its row, or pick it from the header’s Merge list. That list shows worktrees that have uncommitted changes and a quiet agent.
A confirmation lists up to eight of the files ket is about to commit. Then ket:
- Checks the worktree. It stops if a rebase or merge is in progress, or a conflict is unresolved.
- Commits everything in the worktree, with the message
<branch>: uncommitted work (<n> files). You can let an agent write the message instead; ket falls back to the template if it can’t. - Checks the primary checkout. It must have the base branch checked out. If it has uncommitted changes of its own, ket asks, and Merge anyway carries on.
- Merges the branch into the base branch, with the message
ket: merge <branch> into <base>.
If the merge hits a conflict, ket aborts it and leaves the primary checkout as it was. The commit it made in the worktree stays. Resolve the conflict in the worktree with git, then merge again. After ket refuses a merge, Merge with agent asks the worktree’s agent to finish the job.
The worktree is kept after a successful merge, and a toast confirms it. Delete it from its row menu to reclaim the disk, or set keep_after_merge = false under [merge] in config.toml to have ket remove it.