Click a .patch or .diff file. For .mbox and .eml files, right-click and choose Open in Git Patch Viewer (another viewer may own those types).
Apply... and Reverse... are in the viewer toolbar and in the Explorer right-click menu (Apply Patch to Workspace...). Check runs the dry run alone.
With a patch on the clipboard, run Git Patch: Apply Patch from Clipboard... from the Command Palette. Git Patch: View Active Editor as Patch shows a diff you pasted into an editor.
Keys in the viewer: S side by side, I inline, N and P next and previous file.
To try it, run Git Patch: Open the Sample Patch Series.
The Pro tools are in the Command Palette (Git Patch: ... (Pro)), in the Explorer right-click menu, and in the small row at the end of the viewer toolbar. The row closes with its x for the rest of the session, and the setting gitPatch.showProTools hides it for good.
ZOVO PRO AVAILABLEOne-time purchase · No subscription
Add Pro tools to Git Patch Viewer & Apply Diff
Create patches. A patch from staged or unstaged changes, a commit range as a format-patch series with a cover letter, or selected files. Binary files and paths with spaces included; never an empty patch.
Smart apply. Hunk-by-hunk plan with whitespace-insensitive and fuzzy matching, conflict markers where the file differs, and accept or leave out each hunk before anything is written.
Patch series tools. Split a series into numbered files or a patch by file, merge patch files into one mbox, reorder and renumber [PATCH n/m].
Yes. Git Patch Viewer & Apply Diff is free and MIT licensed.
How do I install Git Patch Viewer & Apply Diff?
Click "Install in VS Code" above, or search for zovo.zovo-git-patch in the Extensions view.
Marketplace README snippet (copy link for VS Code Marketplace)
See full docs & install options at [vscode.zovo.one/extensions/zovo-git-patch/](https://vscode.zovo.one/extensions/zovo-git-patch/), browse all Zovo VS Code extensions at [vscode.zovo.one](https://vscode.zovo.one/), or explore [Zovo Pro](https://vscode.zovo.one/pro/).
Auto rename tag and auto close tag as you type in HTML, JSX/TSX, Vue, Svelte, PHP, Blade, Twig, XML and Markdown. One undo step for both tags, never pairs <br> or TypeScript generics, highlights the matching tag. Free, no sign-in, works offline.
Run C++ and C code with one click: compile and run the current file with gcc, g++, clang or clang++. Interactive input in the terminal, an Input panel with saved test cases and diffs, errors in Problems, Stop for endless loops, per-file flags. Free, no sign-in, works offline. Zovo Pro adds a sanitiz
JavaScript playground and TypeScript scratchpad for VS Code: the value of each line shows at the end of the line as you type, with console.log output and errors on their own lines. A live JS and TS runner for quick tests and a REPL-style scratch file, with no tsconfig, no setup and no sign-in. Free,
Free and offline. CSS class names and id completion in HTML, React, Vue, Svelte, Angular, PHP and Blade, from every CSS, SCSS and Less file in your project, <style> blocks, linked style sheets and CSS modules. Go to definition and hover. Light on CPU in big monorepos.
Free HTML preview and HTML viewer beside your editor. Linked CSS, JS and images load, it updates as you type, and nothing is sent anywhere. No sign-in, no server, works offline. Zovo Pro adds save as one file, an accessibility and SEO check and a folder link check.
XSD viewer for VS Code: open XML Schema (.xsd) files and the schemas in .wsdl files as a tree and a diagram, with imports and includes resolved across the workspace, search and jump to line. Offline, no account.