Skip to content

Patch workflows

Creating a patch from the working tree

Tools → Patch → Create opens a right panel with the same two-zone staged/unstaged list the WIP staging panel uses — only what's in the Patch (staged) zone ends up in the file, and the hover +/- (or the bulk button) moves files between the two. Confirming asks where to save the result as a plain .patch file, shareable with anyone even if they don't have push access to your remote.

Creating a patch from the working tree

Captured from the running app by this scenario.

Do this

  1. Open the tools menu
  2. Click the Patch Create menu item
  3. Stage all files in the patch workspace
  4. Click the patch create confirm button
  5. Choose /tmp/git-manager-fixtures/patch-create-test.patch in the folder picker

You should see

  • The patch workspace closes
  • A real patch file exists at /tmp/git-manager-fixtures/patch-create-test.patch

Applying an external patch file

Tools → Patch → Apply takes any .patch/.diff file — not necessarily one this app made — runs a dry-run check first, and lists the files it touches so you can review each diff before committing to it.

Applying an external patch file

Captured from the running app by this scenario.

Do this

  1. Open the tools menu
  2. Click the Patch Apply menu item
  3. Click the patch choose-file button
  4. Choose /tmp/git-manager-fixtures/patch-apply-test.patch in the folder picker
  5. Click the patch apply confirm button

You should see

  • The patch apply confirm button is enabled
  • The patch workspace closes
  • The working tree file app.txt contains the line line 3

Capturing an edit to an installed dependency as a patch

Tools → Patch → Dependency captures a change already made straight in node_modules — pnpm can't see an in-place edit there itself, so this walks it through pnpm's own patch workflow: picking the dependency diffs it against a pristine copy, and confirming writes a .patch file under patches/ and wires it into patchedDependencies, so the edit survives a reinstall exactly as if pnpm patch/patch-commit had been run by hand.

Capturing an edit to an installed dependency as a patch

Captured from the running app by this scenario.

Do this

  1. Open the tools menu
  2. Click the Patch Dependency menu item
  3. Select the left-pad dependency to patch
  4. Click the dependency patch confirm button

You should see

  • The dependency patch confirm button is enabled
  • The patch workspace closes
  • A real dependency patch file exists for left-pad@1.3.0

This page is generated from apps/e2e/features/patch-workspace.feature, the end-to-end test that drives the feature it describes.

MIT licensed · Screenshots exported from the real app by the end-to-end suite.