| Crates.io | git-sync-rs |
| lib.rs | git-sync-rs |
| version | 0.2.0 |
| created_at | 2025-08-16 06:44:37.070452+00 |
| updated_at | 2025-09-10 05:41:13.003533+00 |
| description | Automatic git repository synchronization with file watching |
| homepage | https://github.com/colonelpanic8/git-sync-rs |
| repository | https://github.com/colonelpanic8/git-sync-rs |
| max_upload_size | |
| id | 1798060 |
| size | 182,139 |
A 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.
.gitignore patternscargo install git-sync-rs
# Check if repository is ready to sync
git-sync-rs /path/to/repo check
# Perform one-time sync
git-sync-rs /path/to/repo sync
# Watch for changes and auto-sync
git-sync-rs /path/to/repo watch
# Watch with custom intervals
git-sync-rs /path/to/repo watch --debounce 2 --interval 300
Fully compatible with the original git-sync environment variables:
GIT_SYNC_DIRECTORY - Repository pathGIT_SYNC_REPOSITORY - Repository URL for initial cloneGIT_SYNC_INTERVAL - Sync interval in secondsGIT_SYNC_NEW_FILES - Whether to add new files (true/false)GIT_SYNC_REMOTE - Remote name (default: origin)GIT_SYNC_COMMIT_MESSAGE - Custom commit message templateWatch mode monitors your repository for changes and automatically syncs them:
# Basic watch mode
git-sync-rs watch /path/to/repo
# With custom debounce (wait 2 seconds after changes)
git-sync-rs watch /path/to/repo --debounce 2
# With periodic sync every 5 minutes
git-sync-rs watch /path/to/repo --interval 300
# Dry run mode (detect changes but don't sync)
git-sync-rs watch /path/to/repo --dry-run
Create a configuration file at ~/.config/git-sync-rs/config.toml:
[defaults]
sync_interval = 300
sync_new_files = true
commit_message = "Auto-sync: {hostname} at {timestamp}"
remote_name = "origin"
[[repositories]]
path = "~/my-notes"
sync_new_files = true
[[repositories]]
path = "~/my-docs"
remote_name = "backup"
-n, --new-files - Sync new/untracked files-r, --remote <name> - Specify remote name-d, --directory <path> - Repository path-v, --verbose - Enable verbose output-q, --quiet - Suppress non-error output--config <path> - Use alternate config fileThis tool is designed to be a drop-in replacement for git-sync-on-inotify with additional features and better performance.
Licensed under either of:
at your option.