# Review & Commit

<DiffPreview />

<a id="keyboard-reference"></a>

On Windows and Linux, use Ctrl for ⌘ and Alt for ⌥. Every git action, its shortcut and the git it runs are in [Git Workflow](/docs/git).

## The Workflow

<a id="step-1---open-changes"></a>

### Step 1: Open Changes

Press <KeyCombo keys={["⌘", "⌥", "B"]} /> to open the right 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.

To see one commit's changes, click it in the history graph on the **Details** tab.

<a id="step-2---review-changes"></a>

### Step 2: Review changes

Click a file to open its diff as a tab next to the agent. Toggle between **Split** and **Unified** at the top of the diff. 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={["⌘", "⇧", "["]} /> / <KeyCombo keys={["⌘", "⇧", "]"]} />, or Ctrl+PageUp / Ctrl+PageDown on Windows and Linux), tell it what to fix, and check the diff again.

With uncommitted changes, the top of Changes also offers **Commit** and **Restore**.

> **Warning:** Restore runs `git reset --hard HEAD` and `git clean -fd`: every uncommitted change and every untracked file is gone, with no undo. Gitignored files stay.

<a id="step-3---commit"></a>

### Step 3: Commit

Git actions are off while an agent in the pane is working or the pane is starting. Hover a greyed-out action to see why.

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

> **Note:** Pane stages everything in the worktree. For partial staging, run `git add -p` in a terminal.

<a id="step-4---push"></a>

### Step 4: Push

Branch behind? Press <KeyCombo keys={["⌘", "⇧", "R"]} /> to rebase onto the base branch first. Prefer the terminal? Run `git fetch origin`, then `git rebase origin/main`, using your base branch in place of `main`.

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.

Commits carry Pane as committer by default. See [Commit attribution](/docs/git#commit-attribution).
