A CLI tool to back up and sync Git repositories from hosted platforms (GitHub, GitLab, Bitbucket, Forgejo/Gitea, Azure DevOps) or arbitrary raw git URLs to a local directory.
go install github.com/lucasmodrich/git-sync@latestOr build from source:
git clone https://github.com/lucasmodrich/git-sync.git
cd git-sync
go build -o git-sync .# Interactive configuration wizard
git-sync init
# Run a sync
git-sync --config ~/.config/git-sync/config.yaml
# Preview without making changes
git-sync --dry-run --config ~/.config/git-sync/config.yaml- Bare, mirror, shallow, or full clones
- Periodic sync via built-in cron scheduling
- Concurrent sync with configurable parallelism
- Multi-token round-robin to spread API rate limits
- Wiki and issue backup (GitHub)
- Notifications via ntfy or Gotify
- Platforms: GitHub, GitLab, Bitbucket, Forgejo/Gitea, Azure DevOps, raw git URLs
Default config path: ~/.config/git-sync/config.yaml. Override with --config or GIT_SYNC_CONFIG_FILE.
platform: github
tokens:
- ghp_your_token_here
username: your-username
backup_dir: ~/git-backups
concurrency: 5See CLAUDE.md for full architecture and configuration reference.
Open an issue on GitHub.
This project is a fork of AkashRajpurohit/git-sync, originally created by Akash Rajpurohit. The original README, feature history, and contributor acknowledgements are preserved in HERITAGE.md.
This fork continues development independently under the same MIT licence.
MIT โ see LICENSE.
Copyright (c) 2024 Akash Rajpurohit
Copyright (c) 2026 Lucas Modrich