git-sync

Turn ~/.claude into a git repository and auto-commit changes via a Stop hook.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/andreiverdes/awesome-claude --skill git-sync-andreiverdes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-sync
Source: https://github.com/andreiverdes/awesome-claude/tree/main/skills/git-sync
Command: npx skills add https://github.com/andreiverdes/awesome-claude --skill git-sync-andreiverdes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

git-sync solves the pain of keeping Claude Code settings, keybindings, skills, and memories consistent when you switch machines, recreate environments, or maintain portable dotfiles.

Core Features & Use Cases

  • Portable configuration backup: Turns ~/.claude into a git repository so configuration can be restored anywhere.
  • Auto-sync via Stop hook: Automatically commits and pushes changes when Claude Code stops.
  • Selective tracking for sanity: Tracks key config and relevant content (settings, keybindings, skills, memories) while excluding large or transient runtime data.

Quick Start

Use the git-sync skill when you want to back up and sync your Claude Code configuration by cloning your config repository into a new machine’s ~/.claude and then reinstalling any required plugins.

Frequently Asked Questions about git-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I back up Claude Code settings and memories across multiple machines?

You can sync Claude Code settings across machines by turning the ~/.claude directory into a git repository. This tracks configuration files like settings.json, skills, and memories, pushing them to a remote repository for portable access.

Can I automatically commit and push Claude Code configuration changes?

Yes, you can automatically commit and push Claude Code configuration changes by wiring a Stop hook. This hook executes git add, commits only when diffs exist in whitelisted files, and pushes updates to a configured remote repository.

What is the best way to sync dotfiles and Claude Code skills between environments?

The best way to sync dotfiles and Claude Code skills is using a git repository to manage the ~/.claude directory. By selectively tracking files like skills and CLAUDE.md while excluding runtime artifacts, you maintain consistent environments across devices.

Does git-sync support selective tracking for configuration files?

Git-sync supports selective tracking by whitelisting specific configuration files such as settings.json, keybindings.json, skills, and project memories. This approach excludes large or transient runtime data to keep the repository clean.

How do I onboard a new machine with my existing Claude Code configuration?

To onboard a new machine with your Claude Code configuration, clone your config repository directly into the new machine's ~/.claude directory. After cloning, reinstall any required plugins to restore your environment.

What are the limitations of using a git repository for Claude Code configuration sync?

A limitation of using a git repository for Claude Code sync is the need to manually manage whitelisted files to avoid committing transient runtime artifacts. It requires configuring a Stop hook and ensuring a remote repository is set up for pushing changes.