Add installation instructions to README · Entire
Add installation instructions to README
4466cd1→main·
georg·2mo ago·1 file·+28 added/-8 removed
Document go install and build-from-source paths, and switch the
example commands from go run ./cmd/git-sync to the installed
git-sync binary.
Fixes #20
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Changes
1
- MREADME.md+28/-8
30 unmodified lines
`git-sync` is also a Go library. Use `entire.io/entire/gitsync` for the stable embedding surface (`Probe`, `Plan`, `Sync`, `Replicate`, typed results, auth and HTTP injection). `entire.io/entire/gitsync/unstable` exposes advanced controls (`Bootstrap`, `Fetch`, batching knobs, heap measurement) and is not stable.
## Installation
Requires Go 1.26 or newer.
Install the latest release with `go install`:
```bash
go install entire.io/entire/gitsync/cmd/git-sync@latest
```
This drops a `git-sync` binary into `$(go env GOPATH)/bin`. Make sure that directory is on your `PATH`.
Or build from source:
```bash
git clone https://github.com/entireio/gitsync.git
cd gitsync
go build -o git-sync ./cmd/git-sync
```
## Quick Start
```bash
go run ./cmd/git-sync sync \n git-sync sync \n --source-token "$GITSYNC_SOURCE_TOKEN" \n --target-token "$GITSYNC_TARGET_TOKEN" \n https://github.com/source-org/source-repo.git
```
Run a replication that overwrites differing target refs, and fail instead of falling back to local materialization:
```bash
go run ./cmd/git-sync replicate \n git-sync replicate \n --stats \n https://github.com/source-org/source-repo.git \n https://github.com/target-org/target-repo.git
```
For very large initial migrations, add `--target-max-pack-bytes` to split the initial pack into multiple smaller batches. The same flag works on `sync`, since `sync` auto-bootstraps on empty targets:
```bash
go run ./cmd/git-sync sync \n git-sync sync \n --target-max-pack-bytes 536870912 \n --protocol v2 \n -v \n```
Add `--measure-memory` to any command to sample elapsed time and Go heap usage:
```bash
go run ./cmd/git-sync sync \n git-sync sync \n --measure-memory \n --json \n <source-url> \n```
Sync specific branches:
```bash
go run ./cmd/git-sync sync \n git-sync sync \n --branch main,release \n --source-token "$GITSYNC_SOURCE_TOKEN" \n --target-token "$GITSYNC_TARGET_TOKEN" \n```
Map a source branch to a different target branch:
```bash
go run ./cmd/git-sync sync \n git-sync sync \n --map main:stable \n <source-url> \n <target-url>
```
Mirror tags and prune managed target refs that disappeared from source:
```bash
go run ./cmd/git-sync sync \n git-sync sync \n --tags \n --prune \n <source-url> \n```
Force source-side protocol v2:
```bash
go run ./cmd/git-sync sync \n git-sync sync \n --protocol v2 \n <source-url> \n <target-url>