A VS Code extension that exports selected changed files from the Source Control view as a
Git .patch file which can be re-applied later with git apply.
- 📤 Export Patch from the SCM view — Select one or more changed files in the Source Control view, right-click, and choose Export Patch. The command entry is placed in its own menu group so it is separated from the built-in Git actions by dividers above and below.
- 🧩 Staged, unstaged and new files — The generated patch includes staged and unstaged
changes (relative to
HEAD) as well as untracked (new) files. - 🗂️ Multi-selection & groups — Export a single file, a multi-selection of files, or a whole resource group (for example every change in the working tree) at once.
- 💾 Save anywhere — Pick where to save the
.patchfile, then optionally open it right away. - 🌐 Internationalization — English, Simplified Chinese, and Japanese language support.
- Make some changes in a Git repository so files appear under Source Control (
Ctrl+Shift+G). - Select the changed file(s) you want to export. You can also right-click a changes group header.
- Right-click and choose Export Patch.
- Choose a destination and file name in the save dialog.
- The patch is written to disk. Click Open Patch to view it.
Apply the exported patch later from the repository root:
git apply changes-20260809-041317.patch| Setting | Description |
|---|---|
tlcsdm.gitPatchExporter.defaultDirectory |
Default directory used when saving exported patch files. If empty, the repository root is used. |
- Git must be installed and available on your
PATH.
npm install # install dependencies
npm run compile # type-check and bundle with esbuild
npm run lint # run ESLint and type checks
npm run test # run the extension tests (requires a display / VS Code)