main branches locally
main branches locally
Posted Oct 23, 2025 10:45 UTC (Thu) by ewen (subscriber, #4772)In reply to: main branches locally by gioele
Parent article: Git considers SHA-256, Rust, LLMs, and more
For your 2 (and maybe 3?), with a different pull and push default remote, you might want to look into remote.pushDefault and branch.NAME.pushRemote config options, which can override the remote just for push (ie make it separate from pull):
“remote.pushDefault
The remote to push to by default. Overrides branch.<name>.remote for all branches, and is overridden by branch.<name>.pushRemote for specific branches.”
(I mostly use it to pull from a public HTTP remote, without keys, but push to a SSH remote with keys. But AFAIK it should work for entirely different remotes.)
Ewen
