Seamlessly create and apply git patches for local repositories, GitHub Codespaces, and remote development environments.
PatchItUp is a VS Code extension that makes it easy to create git patches from uncommitted changes in any git repository. Whether you're working locally, in GitHub Codespaces, WSL, Dev Containers, or over SSH, PatchItUp provides an intuitive sidebar UI to create, save, and apply patches - perfect for backing up work-in-progress or transferring changes between environments.
- 📦 Create Patches - Generate git patches from uncommitted changes in any git repository
- 💾 Save Patches - Patches are saved to your configured destination path
- 📋 Apply Patches - Select and apply any saved patch back to your working directory
- 🔍 Diff Patches - Preview what a patch would change (opens diff tabs without modifying your repo)
- 🌐 Works Everywhere - Supports local repos, GitHub Codespaces, WSL, Dev Containers, and SSH remotes
- 🎯 Sidebar UI - Intuitive panel in the activity bar for easy access
- 🔄 Automatic Refresh - Patch list updates automatically after creating new patches
- ⏰ Timestamp Names - Patches named with project and timestamp:
projectname_YYYYMMDDHHMMSS.patch - 📁 Browse Patches - See all your patches in a sortable list (newest first)
- ⚙️ Configurable - Set project name and destination path
The PatchItUp panel showing configuration fields and available patches, allowing for creating and applying patches.
- Install the extension in VS Code
- Open the PatchItUp panel - Click the diff icon in the activity bar (left sidebar)
- Configure settings:
- Project Name:
my-project(used in patch filenames) - Destination Path: Where to save patches (e.g.,
C:\Users\YourName\patches)
- Project Name:
- Make changes in your repository
- Click "Create Patch" - Patch is saved to your destination path
- Apply patches - Select a patch from the list and click "Apply Selected Patch"
- Make changes to files in your git repository (don't commit them)
- Open the PatchItUp panel from the activity bar
- Click Create Patch
- The patch is saved to your destination path with format:
projectname_YYYYMMDDHHMMSS.patch
- Open the PatchItUp panel
- Select a patch from the Available Patches list
- Click Apply Selected Patch
- The patch is applied to the git repository you currently have open in VS Code
- Open the PatchItUp panel
- Select a patch from the Available Patches list
- Click Diff Selected Patch
- PatchItUp creates a temporary working copy of the affected files, applies the patch there, and opens diff editors for the changed files
Notes:
- Temp location is the extension-host temp directory (
%TEMP%on Windows,/tmpon Linux remotes). - This does not modify your working directory.
- If the patch was created from a different repo/branch/history than your current open repository, PatchItUp may fall back to a best-effort preview (some hunks may be rejected).
- Double-click a patch in the Available Patches list to open the
.patchfile in VS Code for editing.
You can also use the command palette (Ctrl+Shift+P):
PatchItUp: Create and Save PatchPatchItUp: Open Panel
Configure the extension in VS Code settings (File > Preferences > Settings):
- Description: Project name prefix for patch files
- Default:
project - Example:
my-app
- Description: Local path on host machine to save patches
- Default: `` (empty - must be configured)
- Windows Example:
C:\Users\YourName\patches - Mac/Linux Example:
/Users/YourName/patches
- VS Code 1.85.0 or higher
- Git installed in your development environment
- Write access to the destination path
- Local Development - Works with any local git repository
- GitHub Codespaces - Create patches in Codespaces and save to your local machine
- WSL - Full support for Windows Subsystem for Linux
- Dev Containers - Works inside development containers
- SSH Remote - Works when connected to remote machines via SSH
- Backup WIP: Save work-in-progress before switching branches or closing your environment
- Transfer Changes: Move changes between environments (Codespaces, local, WSL, etc.)
- Code Review: Create patches for reviewing changes offline or in different contexts
- Experimentation: Try changes and easily revert by applying a previous patch
- Collaboration: Share patches with team members
- Environment Migration: Move uncommitted work from one dev environment to another
- Environment Detection: Automatically detects your environment (local, Codespace, WSL, Dev Container, SSH)
- Smart Path Resolution: Uses the appropriate file system scheme based on your environment
- Git Diff: Uses
git diff HEADto capture all uncommitted changes - Flexible Storage: For remote environments, uses VS Code's
vscode-localURI scheme to access host files; for local environments, uses direct file access - Patch Application: Applies patches using
git applyin the currently open git repository root - Clean Up: Temporary files are automatically removed after applying patches
Patch files use the standard git patch format and are named:
{projectName}_{YYYYMMDDHHMMSS}.patch
Example: tmp_20251126143052.patch
tmp: Project name20251126: Date (November 26, 2025)143052: Time (14:30:52).patch: Extension
- Open a folder that is a git repository (has a
.gitdirectory) - Or initialize one in the folder:
git init - If you have multiple repositories open, focus a file from the repo you want and retry
- Set
patchitup.destinationPathto a valid path - For remote environments (Codespaces, SSH), this should be a path on your local machine
- For local development, this can be any accessible directory
- Make sure the path exists or the extension will create it
- Make sure you have uncommitted changes in your repository
- Changes must be staged or modified (untracked files need to be added first)
- Check that the destination path is correct
- Reload the panel or refresh by changing the destination path
MIT License - see LICENSE file for details
Contributions are welcome! Please feel free to submit issues or pull requests.
Have suggestions or found a bug? Please open an issue on GitHub.
