An open API service indexing awesome lists of open source software.

https://github.com/yangflow/gitrelay

Mirror any Git repository to any other Git repository, automatically — from your Mac.
https://github.com/yangflow/gitrelay

developer-tools git git-mirror github gitlab macos menubar-app swift swiftui sync

Last synced: 2 months ago
JSON representation

Mirror any Git repository to any other Git repository, automatically — from your Mac.

Awesome Lists containing this project

README

          

# GitRelay

Mirror any Git repository to any other Git repository, automatically — from your Mac.

GitRelay is a native macOS app that manages one-way mirror syncs between Git hosting platforms. Point it at a source and a destination, choose a schedule, and it handles the rest: `git clone --mirror`, `git fetch --prune`, `git push --mirror`, all running quietly in the background while you work.

It supports any combination of GitLab, GitHub, Gitea, Gitee, Bitbucket, or self-hosted Git servers — SSH Agent, SSH key, and HTTPS token auth included.

[中文](./README.zh-CN.md)

---

## Features

- **Multi-repo sidebar** — manage any number of repo pairs from one window
- **Full mirror sync** — all branches and tags, one direction, src → dst
- **Scheduled sync** — per-repo frequency: manual, 15 min, 30 min, 1 h, 1 day
- **Auth flexibility** — SSH Agent, SSH key path, or HTTPS token (stored in macOS Keychain)
- **Menu bar quick access** — status at a glance, trigger sync without opening the main window
- **Sync log** — per-run log with credential redaction and error classification
- **Commit delta** — shows how many commits src is ahead of dst before each push

---

## Requirements

- macOS 14 (Sonoma) or later
- Apple Silicon or Intel
- `git` installed (`/usr/bin/git`, `/usr/local/bin/git`, or `/opt/homebrew/bin/git`)

---

## Install

### Homebrew

```bash
brew tap yangflow/tap
brew install --cask gitrelay
```

### Download DMG

Go to [Releases](https://github.com/yangflow/gitrelay/releases) and download the latest `GitRelay-x.y.z.dmg`. Open it and drag GitRelay to Applications.

> Unsigned build: right-click → Open on first launch, or run `xattr -cr /Applications/GitRelay.app`

### Build from source

```bash
git clone https://github.com/yangflow/gitrelay.git
cd gitrelay
open gitrelay.xcodeproj
```

Select the `gitrelay` scheme, press ⌘R.

---

## Usage

1. Click **+** in the toolbar or the empty-state button to add a repo pair.
2. Enter a name, the source URL, and the destination URL.
3. Choose the auth method for each side — SSH Agent requires no extra setup if `ssh-agent` is already running.
4. Set a sync frequency and click **Add**.
5. GitRelay clones the source as a bare mirror on first sync, then fetches and pushes on every subsequent run.

The menu bar icon shows aggregate status: a warning triangle if any repo has a sync failure.

---

## Data locations

| What | Where |
|------|-------|
| Repo configs | `~/.local/share/gitrelay/repos.json` |
| Mirror clones | `~/.local/share/gitrelay/mirrors//` |
| HTTPS tokens | macOS Keychain |

---

## Regenerate app icon

The icon PNGs are generated by a Swift script and committed to the repo. To regenerate them (e.g. after a palette change):

```bash
swift scripts/generate-icon.swift
```

---

## License

MIT — see [LICENSE](./LICENSE).