Multi-Remote Patterns
Multi-remote patterns I’ve actually used. Every entry has a date and context.
2026-04-02: Fix Port 443 SSH Remote
Problem: Repos cloned during P16g deployment used ssh://ssh.github.com:443/ workaround (port 22 was blocked by hotel WiFi firewall). After connecting to home network, needed standard SSH URLs.
Context: P16g deployment, dots-quantum and domus-* repos
The Fix:
# Check current remote
git remote -v
# WRONG: still has port 443 workaround
# origin ssh://ssh.github.com:443/EvanusModestus/dots-quantum.git
# Fix to standard SSH
git remote set-url origin git@github.com:EvanusModestus/dots-quantum.git
# Verify
git remote -v
Rule: After cloning through firewall workarounds, fix remote URLs once on a clean network. Check all repos.
Worklog: WRKLOG-2026-04-02
2026-03: Three-Remote Push Strategy
Problem: Need to push every domus-* repo to GitHub (primary), GitLab (mirror), and Gitea (local).
Context: All domus-* repos, redundancy strategy
The Fix:
# Add remotes once per repo
git remote add gitlab git@gitlab.com:EvanusModestus/repo.git
git remote add gitea git@gitea-01.inside.domusdigitalis.dev:evanusmodestus/repo.git
# Push all remotes
git push origin main && git push gitlab main && git push gitea main
# Or use Makefile target
make push # pushes to all three
Rule: Three remotes (origin/gitlab/gitea). make push for convenience. Never rely on a single host.
2026-03: git -C for Multi-Repo Operations
Problem: Need to run git commands across multiple repos without changing directory.
Context: Daily workflow, managing 15+ domus-* spoke repos
The Fix:
# WRONG: subshell or cd
cd ~/repo && git status
(cd ~/repo && git pull)
# RIGHT: explicit, stays in current directory
git -C ~/atelier/_bibliotheca/domus-captures status
git -C ~/atelier/_bibliotheca/domus-infra-ops pull
# Parallel pushes
git -C ~/repo1 push origin main &
git -C ~/repo2 push origin main &
wait
Rule: git -C is always better than cd &&. Stays in current directory, no subshell needed.