Seamlessly transfer work-in-progress between machines without committing to git history
Git Continuity lets you export your staged and unstaged changes as a patch, transfer it to another machine, and continue working right where you left off—all without polluting your git history with "WIP" commits.
- Beautiful Previews - See exactly what you're exporting/importing with Glow and Bat
- Scrollable Previews - Navigate through long diffs with full keyboard control
- Interactive TUI - Gorgeous terminal interface powered by Gum
- Built-in SCP Transfer - Automatically transfer patches to remote hosts
- Saved Hosts - Configure once, sync forever
- Bidirectional - Work seamlessly between desktop ↔ laptop ↔ server
- Smart Patching - Handles staged, unstaged, and binary files
- Safe - Preview before export, preview before import—no surprises
- Graceful Degradation - Works perfectly even without optional dependencies
# On your desktop
$ git add src/auth.rb spec/auth_spec.rb
$ git-continuity export
╭─────────────────────────────╮
│ 👁 Changes to Export │
╰─────────────────────────────╯
src/auth.rb | 45 ++++++++++++++++++++++++++++++------
spec/auth_spec.rb | 28 ++++++++++++++++++++++
2 files changed, 67 insertions(+), 6 deletions(-)
[Beautiful syntax-highlighted diff with Glow]
Proceed with export? (y/N) ❯ y
✓ Patch created successfully
Transfer to remote host? (y/N) ❯ y
❯ laptop
desktop
📤 Transferring to laptop...
✓ Successfully transferred!
# On your laptop
$ git-continuity import
╭───────────────────────────╮
│ 📥 Import Git Changes │
╰───────────────────────────╯
❯ feature-auth-20250117.patch
📋 Patch Information
Created: 2025-01-17 14:30:22
Branch: feature/auth
Apply this patch? (y/N) ❯ y
✓ Patch applied successfully!# Install optional dependencies (recommended for best experience)
brew install gum glow bat
# Download and install git-continuity
curl -O https://raw.githubusercontent.com/yourusername/git-continuity/main/git-continuity.sh
chmod +x git-continuity.sh
sudo mv git-continuity.sh /usr/local/bin/git-continuity# Install Gum
go install github.com/charmbracelet/gum@latest
# Install Glow
go install github.com/charmbracelet/glow@latest
# Install Bat
# Ubuntu/Debian
sudo apt install bat
# Arch Linux
sudo pacman -S bat
# Fedora
sudo dnf install bat
# Download and install git-continuity
curl -O https://raw.githubusercontent.com/yourusername/git-continuity/main/git-continuity.sh
chmod +x git-continuity.sh
sudo mv git-continuity.sh /usr/local/bin/git-continuity# Clone the repository
git clone https://github.com/yourusername/git-continuity.git
cd git-continuity
# Make executable
chmod +x git-continuity.sh
# Optional: Add to PATH
sudo cp git-continuity.sh /usr/local/bin/git-continuity# 1. Configure a remote host (one-time setup)
git-continuity config
# Add your laptop: user@laptop-ip:~/patches
# 2. Export your work
cd your-project
git add .
git-continuity export
# 3. On your other machine, import
git-continuity import
# Select the patch and apply!# Interactive mode with preview
git-continuity export
# Specify filename
git-continuity export my-feature.patch
# Export and transfer via SCP
git-continuity export --scp laptop
# Skip preview for speed
git-continuity export --no-preview# Interactive mode with preview
git-continuity import
# Direct file
git-continuity import my-feature.patch
# Skip preview for speed
git-continuity import --no-preview# Preview without applying
git-continuity preview my-feature.patch
# Interactive preview
git-continuity
# Choose "Preview patch"# Manage remote hosts
git-continuity config
# List available patches
git-continuity list# Morning: Start on desktop
git add src/feature.rb
git-continuity export --scp laptop
# Afternoon: Continue on laptop at coffee shop
git-continuity import
# ... work continues ...
git-continuity export --scp desktop
# Evening: Back to desktop, finalize
git-continuity import
git commit -m "Complete feature"
git push# Teammate sends you a patch
git-continuity preview team-feature.patch
# Review the changes
git-continuity import team-feature.patch# Export experimental changes
git-continuity export experiment.patch
# Test on another machine without committing
# If it works: commit on original machine
# If it fails: discard and keep working# Export to USB drive
git-continuity export work.patch
cp work.patch /Volumes/USB/
# Import on air-gapped machine
git-continuity import /Volumes/USB/work.patchConfigured hosts are saved in: ~/.config/git-continuity/config
# Interactive configuration
git-continuity config
# Example config file
HOST_laptop_HOST="user@192.168.1.10"
HOST_laptop_PATH="~/git-continuity-patches"
HOST_desktop_HOST="mydesktop.local"
HOST_desktop_PATH="~/patches"Git Continuity works seamlessly with your ~/.ssh/config:
# ~/.ssh/config
Host laptop
HostName 192.168.1.10
User myuser
IdentityFile ~/.ssh/id_rsa
Host desktop
HostName 192.168.1.20
User myuserThen just use: git-continuity export --scp laptop
Patches are stored in: ~/.local/share/git-continuity/patches/
This centralized location makes the import picker work automatically and keeps your patches organized.
Before creating a patch, see:
- File statistics (additions/deletions)
- Complete diff with syntax highlighting
- Confirmation before proceeding
Before applying a patch, see:
- Patch metadata (date, branch, commit)
- Change summary
- Optional full diff review
- Untracked files list
Git Continuity automatically detects when previews are too long for your terminal and enables scrollable pager mode with full navigation support.
When viewing a long diff, you'll see:
Long diff detected - entering scrollable view (press 'q' to exit)
Basic Navigation:
Space / f : Scroll down one page
b : Scroll up one page
↓ / ↑ : Scroll line by line
d / u : Scroll half-page down/up
g / G : Jump to beginning/end
Search & Find:
/pattern : Search forward for pattern
?pattern : Search backward for pattern
n : Jump to next search result
N : Jump to previous search result
Exit:
q : Quit preview and continue
While viewing a preview, you can search for:
bash
/api_key # Find API keys or secrets
/TODO # Find TODO comments
/password # Check for hardcoded passwords
/^diff --git # Jump between different files
/FIXME # Find FIXME commentsExample workflow:
bash
$ git-continuity export
# Preview appears with 500 lines of changes
📜 Long diff detected - entering scrollable view (press 'q' to exit)
# Press '/' to search
/api_key
# Found on line 127
# Press 'n' to find next occurrence
# Press 'q' when done reviewing- Glow (preferred): Beautiful markdown-style formatted diffs
- Bat (fallback): Syntax-highlighted with line numbers
- Plain (always works): Basic colored output
- Bash 5.0+
- Git
- Gum - Interactive TUI
- Glow - Beautiful diff rendering
- Bat - Syntax highlighting
- SSH/SCP - For automatic transfers
Note: Git Continuity works perfectly without optional dependencies—it gracefully falls back to basic functionality.
You're working on a feature but need to switch machines:
- ❌ Committing WIP work pollutes git history
- ❌ Pushing incomplete code to remote is unprofessional
- ❌ Stashing doesn't transfer between machines
- ❌ Manual
git diff > patchis tedious and error-prone
Git Continuity creates portable patches of your work:
- ✅ No WIP commits in your history
- ✅ Transfer via SCP, USB, cloud—your choice
- ✅ Handles staged, unstaged, and binary files
- ✅ Preview before export/import—catch mistakes
- ✅ Simple, fast, and reliable
The script works without them—install for better UX:
brew install gum glow batSet up SSH keys:
ssh-copy-id user@hostname- Ensure you're in the correct git repository
- Check that base commits are similar
- Review conflicts with:
git status
- Check:
git-continuity list - Use full path:
git-continuity import /full/path/to/patch.patch
MIT License - see LICENSE file for details
Built with amazing tools from the Charm community:
Made with ❤️ for developers who work across multiple machines