Files
computer-playbook/docs/contributing/artefact/git/remotes.md
kevinveenbirkenbachandClaude Opus 4.7 d91ae53d43 docs(git/remotes): align with git-maintainer-tools v1.1.0 push routing
The tool now pins branch.main.pushRemote to origin, so main pushes go
upstream while other branches keep landing on the personal fork. The
layout table and the new Push Routing section reflect this and list
the three git-config keys the tool writes. Also tighten the sandbox
rule to MUST per the docs RFC-2119 style.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 00:08:53 +02:00

2.6 KiB

Remotes 🌐

This repository uses a fork-based workflow. Contributors MUST 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. Pull target for all branches. Push target for main.
fork git@github.com:<user>/infinito-nexus-core.git Personal fork. Push target for every branch except main.

Push Routing 🛤️

git-setup-remotes writes three git-config keys that together route pushes:

Key Value Effect
remote.pushDefault fork Default push target for every branch.
push.default current git push targets the same-named branch on the remote.
branch.main.pushRemote origin Overrides the default for main so canonical-branch pushes go upstream and never land on the personal fork, whose branch-protection rules can diverge from canonical.

main keeps tracking origin/main for git pull, independent of the push override.

Tools 🧰

CLI Purpose
git-setup-remotes Idempotently configures origin, fork, main-tracking, and the push-routing keys above.
git-sign-push GPG-signs every unpushed commit on the current branch and pushes. The target resolves from the branch's upstream and honours branch.<name>.pushRemote. Branches without an upstream fall back to remote.pushDefault, then origin.

Both CLIs MUST run outside 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.