Syncs Claude Code conversation history across machines using git repositories. Ideal for developers and teams working with multiple devices. Integrates with git workflows for version control and collaboration.
git clone https://github.com/perfectra1n/claude-code-sync.gitclaude-code-sync is a command-line tool that backs up and synchronizes your Claude Code conversation history by pushing it to a git repository. It discovers conversation files stored locally in ~/.claude/projects/ and syncs them across multiple computers while maintaining version control. The tool handles multi-machine workflows by automatically merging non-conflicting changes, detecting conflicts when the same session is modified on different machines, and resolving them through an interactive TUI. Developers and teams can use it to prevent conversation loss, maintain consistency across devices, track conversation changes over time, and integrate Claude Code history into existing git workflows—with optional support for Git LFS for large files and Mercurial as an alternative backend.
["Install git on all machines you use with Claude Code (brew install git, apt install git, etc.)","Initialize a new git repository in your project directory or clone an existing one: `git init` or `git clone [YOUR_REPO_URL]`","Configure the remote for Claude Code sync: `git remote add claude-sync [GIT_REPO_URL]`","Set up branch tracking: `git branch --set-upstream-to=claude-sync/main` (adjust branch name as needed)","Enable automatic sync in Claude Code settings (Preferences > Code Sync > Enable Git Sync)","Use the prompt template above to customize sync behavior for your project","Tip: Add .claudeignore file to exclude files/folders from sync (similar to .gitignore)"]
Back up Claude Code conversations to prevent data loss
Keep conversation history synchronized across multiple development machines
Track and version control changes to Claude Code sessions over time
Resolve conflicts when conversations are modified on different computers
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/perfectra1n/claude-code-syncCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Set up [GIT_REPO_URL] as a remote for my Claude Code sync repository. Initialize the sync process to track changes in [PROJECT_DIRECTORY] and push updates to [REMOTE_BRANCH]. Ensure all files in [INCLUDED_EXTENSIONS] are monitored for changes. Resolve any merge conflicts by preferring local changes over remote ones.
Successfully initialized Claude Code sync for your project 'web-portal' in /Users/dev/projects/web-portal. The repository is now linked to your GitHub remote at git@github.com:your-team/web-portal-claude-sync.git with branch 'claude-sync'. Current sync status: - 42 files tracked (js, ts, json, md) - Last sync: 2 hours ago (commit 7a3b1c2) - Pending changes: 3 files modified locally (src/components/Button.tsx, package.json, README.md) - Remote changes: 1 new file added (src/utils/api.ts) Merge conflict detected in src/components/Button.tsx: - Local: Added new prop 'disabled' to Button component - Remote: Modified Button component styles - Resolution: Applied local changes (preferred) and preserved remote styling Next steps: 1. Review the merged changes in src/components/Button.tsx 2. Run 'git push claude-sync' to sync with remote 3. Verify all tests pass in your local environment Sync completed successfully in 1.2 seconds. All files are now synchronized across your devices.
we're driven to solve impossible problems, impossibly fast.
AI assistant built for thoughtful, nuanced conversation
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan