Shape
Docs

Diff and Merge

Review Git changes, stage hunks, and inspect AI-proposed edits in comparison views.

Shape shows file differences in dedicated diff tabs so you can review changes before committing or keeping AI edits.

Git diff tabs

From Source Control, click a changed file to open a diff tab. Tabs are labeled with the filename and context:

LabelMeaning
Working TreeUnstaged changes vs the index
IndexStaged changes vs the last commit

The diff view uses Monaco's inline comparison with added and removed highlighting.

Hunk actions

A toolbar follows the hunk under the cursor:

DiffButtonShortcut
Working TreeStageCtrl+Y
Working TreeRestore(toolbar)
IndexUnstageCtrl+Shift+Y

The label shows Hunk N/M. Select changed lines to stage, unstage, or restore only that selection instead of the whole hunk.

Unstaged and staged diffs open as separate tabs so you can compare both states.

Open diffs from Git Graph

In the Git Graph, right-click a commit and choose Compare with Working Tree or View Changes to inspect historical diffs.

AI edit previews

When AI chat edits files, each change appears as a review card after it is written to disk (unless you require approval first).

  1. Click the file in the pending strip to open a diff in the editor.
  2. Compare the latest step against the previous version.
  3. Keep leaves the file as written. Undo restores the baseline from before the unresolved edit chain.

See Reviewing Edits for Keep/Undo and optional pre-write approval.

Merge conflicts

If a git pull or merge produces conflicts, Shape surfaces conflict markers in the affected files. Open the file in the editor and look for standard conflict sections:

Plain text
<<<<<<< HEAD
your changes
=======
incoming changes
>>>>>>> branch

Resolve conflicts manually in the editor, then stage the file and commit. Shape does not yet provide a dedicated three-way merge UI. Use the diff tabs and editor for manual resolution.

Tips

  • Close diff tabs with Ctrl+W when review is done.
  • Enable Git: Blame in settings to see line attribution while reviewing changes.
Edit