{"id":31045899,"url":"https://github.com/colonelpanic8/git-sync-rs","last_synced_at":"2026-02-11T05:08:48.913Z","repository":{"id":310168271,"uuid":"1038943794","full_name":"colonelpanic8/git-sync-rs","owner":"colonelpanic8","description":"Rust implementation of automatic git repository synchronization with file watching","archived":false,"fork":false,"pushed_at":"2025-09-10T05:41:01.000Z","size":133,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-10T09:01:14.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colonelpanic8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-16T06:14:39.000Z","updated_at":"2025-09-10T05:41:04.000Z","dependencies_parsed_at":"2025-08-16T08:49:13.914Z","dependency_job_id":null,"html_url":"https://github.com/colonelpanic8/git-sync-rs","commit_stats":null,"previous_names":["colonelpanic8/git-sync-rs"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/colonelpanic8/git-sync-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fgit-sync-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fgit-sync-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fgit-sync-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fgit-sync-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colonelpanic8","download_url":"https://codeload.github.com/colonelpanic8/git-sync-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fgit-sync-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275143585,"owners_count":25413091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-14T17:47:11.983Z","updated_at":"2026-02-11T05:08:48.907Z","avatar_url":"https://github.com/colonelpanic8.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-sync-rs\n\n[![CI](https://github.com/colonelpanic8/git-sync-rs/workflows/CI/badge.svg)](https://github.com/colonelpanic8/git-sync-rs/actions)\n[![Crates.io](https://img.shields.io/crates/v/git-sync-rs.svg)](https://crates.io/crates/git-sync-rs)\n[![Documentation](https://docs.rs/git-sync-rs/badge.svg)](https://docs.rs/git-sync-rs)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nA Rust implementation of automatic git repository synchronization with file watching capabilities. This tool automatically commits, pushes, and pulls changes to keep your repositories in sync.\n\n## Features\n\n- 🔄 **Automatic synchronization** - Commits, fetches, pushes, and merges/rebases automatically\n- 👀 **File watching** - Monitors file changes and triggers sync with debouncing\n- 🚫 **Gitignore support** - Respects `.gitignore` patterns\n- 📦 **Repository cloning** - Automatically clones repositories if they don't exist\n- 🔐 **SSH authentication** - Works with SSH keys (with fallback to git command)\n- ⚡ **Efficient** - Only syncs when changes are detected\n- 🧪 **Dry-run mode** - Test your configuration without making changes\n- 🔧 **Flexible configuration** - Configure via TOML, environment variables, or CLI\n\n## Installation\n\n```bash\ncargo install git-sync-rs\n```\n\n## Usage\n\n### Basic Commands\n\n```bash\n# Check if repository is ready to sync\ngit-sync-rs /path/to/repo check\n\n# Perform one-time sync\ngit-sync-rs /path/to/repo sync\n\n# Watch for changes and auto-sync\ngit-sync-rs /path/to/repo watch\n\n# Watch with custom intervals\ngit-sync-rs /path/to/repo watch --debounce 2 --interval 300\n```\n\n### Environment Variables\n\nFully compatible with the original `git-sync` environment variables:\n\n- `GIT_SYNC_DIRECTORY` - Repository path\n- `GIT_SYNC_REPOSITORY` - Repository URL for initial clone\n- `GIT_SYNC_INTERVAL` - Sync interval in seconds\n- `GIT_SYNC_NEW_FILES` - Whether to add new files (true/false)\n- `GIT_SYNC_REMOTE` - Remote name (default: origin)\n- `GIT_SYNC_COMMIT_MESSAGE` - Custom commit message template\n\n### Watch Mode\n\nWatch mode monitors your repository for changes and automatically syncs them:\n\n```bash\n# Basic watch mode\ngit-sync-rs watch /path/to/repo\n\n# With custom debounce (wait 2 seconds after changes)\ngit-sync-rs watch /path/to/repo --debounce 2\n\n# With periodic sync every 5 minutes\ngit-sync-rs watch /path/to/repo --interval 300\n\n# Dry run mode (detect changes but don't sync)\ngit-sync-rs watch /path/to/repo --dry-run\n```\n\n### Configuration File\n\nCreate a configuration file at `~/.config/git-sync-rs/config.toml`:\n\n```toml\n[defaults]\nsync_interval = 300\nsync_new_files = true\ncommit_message = \"Auto-sync: {hostname} at {timestamp}\"\nremote_name = \"origin\"\n\n[[repositories]]\npath = \"~/my-notes\"\nsync_new_files = true\n\n[[repositories]]\npath = \"~/my-docs\"\nremote_name = \"backup\"\n```\n\n## Command Line Options\n\n- `-n, --new-files` - Sync new/untracked files\n- `-r, --remote \u003cname\u003e` - Specify remote name\n- `-d, --directory \u003cpath\u003e` - Repository path\n- `-v, --verbose` - Enable verbose output\n- `-q, --quiet` - Suppress non-error output\n- `--config \u003cpath\u003e` - Use alternate config file\n\n## Compatibility\n\nThis tool is designed to be a drop-in replacement for `git-sync-on-inotify` with additional features and better performance.\n\n## License\n\nLicensed under either of:\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n\nat your option.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolonelpanic8%2Fgit-sync-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolonelpanic8%2Fgit-sync-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolonelpanic8%2Fgit-sync-rs/lists"}