Files
computer-playbook/docs/contributing/artefact/git/remotes.md
T
kevinveenbirkenbach 8563df9400 chore: adopt git-maintainer-tools as dev dependency for git ops
Drop the project-local copy of scripts/git/sign-push.sh in favour of
the git-maintainer-tools CLIs (git-setup-remotes, git-sign-push),
which now ship as a standalone PyPI/GitHub package so the same helpers
can be reused across every maintainer repo without vendoring shell
scripts.

The package is declared in pyproject.toml's `dev` extras and lands on
$PATH via `make install-python-dev` (which already runs
`pip install -e .[dev]`). Consumers invoke the CLIs directly; there
are no make wrappers because doing so would just duplicate help text
the tool itself already prints.

Fallout:
  * scripts/git/sign-push.sh deleted.
  * Makefile: sign-push target removed (no replacement target).
  * .claude/settings.json: deny rule for `make sign-push*` replaced
    with direct `git-setup-remotes*` / `git-sign-push*` denies so the
    sandbox blocks the real binaries, not just the make alias.
  * CLAUDE.md: operator instruction points at the bare `git-sign-push`
    CLI + `make install-python-dev` for setup.
  * docs/contributing/artefact/git/remotes.md: new tool-focused page.
    Describes the layout and the two CLIs; does not duplicate raw git
    commands already covered by git-maintainer-tools.
  * docs/contributing/artefact/git/README.md: trimmed per readme_md.md
    (docs READMEs must not act as a file index).
  * docs/contributing/tools/make.md: Git section now documents the
    external CLIs and the install entry point, not a wrapper target.
2026-04-25 09:38:26 +02:00

2.1 KiB

Remotes 🌐

This repository uses a fork-based workflow. Contributors SHOULD NOT configure the remote layout by hand. Remote setup and signed pushes are handled by git-maintainer-tools, declared as a dev dependency in pyproject.toml.

Layout 🗺️

Remote URL Role
origin git@github.com:infinito-nexus/core.git Canonical / upstream. main tracks origin/main. Pull target.
fork git@github.com:<user>/infinito-nexus-core.git Personal fork. Push target for every branch.

The tool enforces remote.pushDefault = fork so every push (and every new-branch push via git-sign-push) lands on the fork, not on the canonical repo, while main keeps pulling from canonical.

Tools 🧰

CLI Purpose
git-setup-remotes Idempotently configures origin, fork, main-tracking, and remote.pushDefault on a clone.
git-sign-push GPG-signs every unpushed commit on the current branch and pushes to the fork (or the branch's upstream if set). Resolves the target from remote.pushDefault, falling back to origin.

Both CLIs refuse to run inside the Claude sandbox because .git/config writes and ~/.gnupg access are blocked there per the Git Safety Protocol in settings.md.

Install 📦

make install-python-dev

This pulls in git-maintainer-tools through the project's dev extras and puts git-setup-remotes and git-sign-push on $PATH.

Usage 🚀

  • One-time setup (run once after cloning, outside the Claude sandbox): git-setup-remotes --canonical git@github.com:infinito-nexus/core.git. See the tool's README for all flags, the FORK_URL environment variable, and the clone-from-canonical case.
  • Shipping a branch: commit per commit.md, then run git-sign-push outside the sandbox. Open the pull request against origin/main per pull-request.md.