Skip to content

lucasmodrich/git-sync

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

329 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

About

๐Ÿ”„ A simple tool to backup and sync your git repositories

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Go 98.6%
  • Other 1.4%