# Review & Commit

import { Callout } from "nextra/components";

<DiffPreview />

## The Workflow

### Step 1 — Open Changes

Press <KeyCombo keys={["⌘", "⇧", "B"]} /> to open the right-hand panel, then pick **Changes**. It lists every file the agent touched, with lines added and removed. It refreshes on its own as the agent keeps writing. Use the arrow keys and Enter to move through it without the mouse.

### Step 2 — Review changes

Click a file to open its diff as a tab next to the agent. Toggle between **split** and **unified** view in the diff's top-right corner. Want the diff beside the agent? Drag its tab to the edge of the agent's tab group.

Found a problem? Switch back to the agent's tab (<KeyCombo keys={["⌘", "A"]} /> / <KeyCombo keys={["⌘", "D"]} />), tell it what to fix, and check the diff again.

With uncommitted changes, the panel header also offers **Commit** and **Restore**. Restore throws away every uncommitted change, after you confirm.

### Step 3 — Commit

Press <KeyCombo keys={["⌘", "⇧", "K"]} /> to stage all changes and open the commit message dialog. Type your message and confirm.

<Callout type="info">
  Pane stages everything in the worktree. There is no partial staging UI — cherry-pick files in a terminal with `git add -p` if you need fine-grained control.
</Callout>

### Step 4 — Push

Press <KeyCombo keys={["⌘", "⇧", "U"]} /> to push the branch to your remote. From there, open a pull request in GitHub, GitLab, or wherever your repo lives.

## Keyboard Reference

| Action | macOS | Windows / Linux |
|--------|-------|-----------------|
| Cycle tabs | <KeyCombo keys={["⌘", "A"]} /> / <KeyCombo keys={["⌘", "D"]} /> | <KeyCombo keys={["Ctrl", "A"]} /> / <KeyCombo keys={["Ctrl", "D"]} /> |
| Commit | <KeyCombo keys={["⌘", "⇧", "K"]} /> | <KeyCombo keys={["Ctrl", "⇧", "K"]} /> |
| Push | <KeyCombo keys={["⌘", "⇧", "U"]} /> | <KeyCombo keys={["Ctrl", "⇧", "U"]} /> |
| Undo commit | <KeyCombo keys={["⌘", "⌥", "Z"]} /> | <KeyCombo keys={["Ctrl", "Alt", "Z"]} /> |
| Pull | <KeyCombo keys={["⌘", "⇧", "L"]} /> | <KeyCombo keys={["Ctrl", "⇧", "L"]} /> |
| Rebase from main | <KeyCombo keys={["⌘", "⇧", "R"]} /> | <KeyCombo keys={["Ctrl", "⇧", "R"]} /> |
| Merge to main | <KeyCombo keys={["⌘", "⇧", "M"]} /> | <KeyCombo keys={["Ctrl", "⇧", "M"]} /> |
| Command palette | <KeyCombo keys={["⌘", "⇧", "P"]} /> | <KeyCombo keys={["Ctrl", "⇧", "P"]} /> |

<Toggle title="Undo a commit">

Press <KeyCombo keys={["⌘", "⌥", "Z"]} /> to undo the last commit. Your changes stay staged, so nothing is lost. Use this to rewrite the commit message or add a missed file before re-committing.

This runs `git reset --soft HEAD~1` under the hood.

</Toggle>

<Toggle title="Rebasing from main before pushing">

If the main branch has moved since you created the pane, rebase before pushing to keep history clean. Press <KeyCombo keys={["⌘", "⇧", "R"]} /> to rebase the pane onto main. Or do it yourself in the pane's terminal:

```bash
git fetch origin
git rebase origin/main
```

Run this in the pane's terminal. Fix any conflicts, then push as normal.

If Pane's own rebase or merge hits a conflict, the error dialog offers **Use Claude Code to Resolve**, which hands the conflict to Claude Code in that pane.

</Toggle>

<Toggle title="Commit attribution">

You're the commit author, from your global `~/.gitconfig`. By default Pane also sets the committer to "Pane" and adds a `Co-Authored-By: Pane` line when you commit with Pane's commit action. Turn either off in **Settings → Worktrees & Git**. See [Git](/docs/git) for details.

</Toggle>
