Declarative git remote management. Define your remotes in a .gemote file, commit it, and keep the whole team in sync.
cargo install gemotecargo install --path .Built and attested binaries are available for Linux, macOS, and Windows. Download from GitHub Releases
docker run --rm -v "$(pwd):/repo" -w /repo ghcr.io/twangodev/gemote syncWrite your current local remotes into a .gemote file:
gemote save
gemote save -f # replace existing .gemote (--force)
gemote save -r # recursive mode (--recursive)Set your local remotes to match the .gemote config:
gemote sync
gemote sync --dry-run # preview changes without applying
gemote sync -r # recursive mode (--recursive)--config <path> Path to config file (default: .gemote at repo root)
--repo <path> Path to git repository (default: discovered from cwd)
.gemote uses TOML:
[settings]
# What to do with local remotes not in this file: "ignore" (default), "warn", "remove"
extra_remotes = "ignore"
[remotes.origin]
url = "git@github.com:org/repo.git"
[remotes.upstream]
url = "git@github.com:upstream/repo.git"
push_url = "git@github.com:you/repo.git" # optional, only if push URL differsWhen using -r/--recursive, gemote automatically discovers git submodules and nested repos. Their remotes are stored under [submodules."<path>"]:
[remotes.origin]
url = "git@github.com:org/repo.git"
[submodules."libs/core".remotes.origin]
url = "git@github.com:org/core.git"
[submodules."libs/core".remotes.upstream]
url = "git@github.com:upstream/core.git"