feat(setup-remotes): pin branch.main.pushRemote to origin
Direct pushes on the canonical branch now target upstream instead of the personal fork whose branch-protection rules can diverge. Feature branches still fall back to the fork via remote.pushDefault. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ Configures a clone for a fork-based workflow and is idempotent.
|
||||
- `fork` points at the maintainer's personal fork.
|
||||
- `main` tracks `origin/main`.
|
||||
- `remote.pushDefault` = `fork`, `push.default` = `current` so every `git push` and every `git push -u` for a new branch lands on the fork, not on the canonical repo.
|
||||
- `branch.main.pushRemote` = `origin` so a direct push on the canonical branch targets upstream, not the personal fork (whose branch-protection rules can diverge).
|
||||
|
||||
Usage:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user