Spork-create mise task sets up a floating-branch soft-fork of a mirrored upstream project with daily mirror-sync via Forgejo Actions. Includes explanation card, how-to guides for setup and branch management, and the spork-create uv script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.4 KiB
2.4 KiB
| title | modified | last-reviewed | tags | |||
|---|---|---|---|---|---|---|
| Create a Spork | 2026-03-28 | 2026-03-28 |
|
Create a Spork
How to set up a floating-branch soft-fork ("spork") of a mirrored upstream project using mise run spork-create.
Prerequisites
- Mirror already exists at
mirrors/<project>on forge (see manage-forgejo-mirrors) - 1Password CLI authenticated (
opCLI) - SSH access to
forge.ops.eblu.me:2222
Create the spork
mise run spork-create kingfisher
This will:
- Fork
mirrors/kingfisher→eblume/kingfisheron forge - Create a
blumeopsbranch from upstream's main branch - Remove any upstream
.forgejo/directory (if present) - Add
.forgejo/workflows/mirror-sync.yamland commit it - Set
blumeopsas the default branch - Clone to
~/code/3rd/kingfisherwith three remotes:origin,mirror,upstream
Options:
mise run spork-create kingfisher --dry-run # preview only
mise run spork-create kingfisher --no-clone # skip local clone
mise run spork-create kingfisher --main-branch dev # override branch name
Verify the setup
cd ~/code/3rd/kingfisher
git remote -v
# origin ssh://forgejo@forge.ops.eblu.me:2222/eblume/kingfisher.git (fetch)
# mirror ssh://forgejo@forge.ops.eblu.me:2222/mirrors/kingfisher.git (fetch)
# upstream https://github.com/mongodb/kingfisher.git (fetch)
git branch -a
# * blumeops
# remotes/origin/blumeops
# remotes/origin/main
What happens next
The mirror-sync workflow runs daily at 05:00 UTC and:
- Fast-forwards
mainfrom the mirror - Rebases
blumeopson top ofmain - Rebases any
feature/local/*andfeature/upstream/*branches - Rebuilds the
deploybranch (all features merged)
See manage-spork-branches for working with feature branches.
Terminology
| Term | Meaning |
|---|---|
origin |
Your mutable fork at eblume/<project> on forge |
mirror |
Read-only upstream mirror at mirrors/<project> on forge |
upstream |
Canonical upstream repository (e.g., GitHub) |
main |
Clean upstream tracking branch (may be named master, dev, etc.) |
blumeops |
Default branch — upstream + local workflows/tooling |
deploy |
Build artifact branch — everything merged, used for deployments |
See also
- manage-spork-branches — creating feature branches, upstreamable vs local
- manage-forgejo-mirrors — mirror setup and PAT rotation