Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 1.87 KB

File metadata and controls

72 lines (49 loc) · 1.87 KB

git-sync

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.

Installation

go install github.com/lucasmodrich/git-sync@latest

Or build from source:

git clone https://github.com/lucasmodrich/git-sync.git
cd git-sync
go build -o git-sync .

Quick start

# 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

Features

  • 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

Configuration

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: 5

See CLAUDE.md for full architecture and configuration reference.

Bugs and feature requests

Open an issue on GitHub.

Heritage

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.

License

MIT — see LICENSE.

Copyright (c) 2024 Akash Rajpurohit
Copyright (c) 2026 Lucas Modrich