Patch Sets
Patch Sets let you maintain an ordered stack of diffs on top of any repository's branch. Sync an upstream repo, layer your customizations as discrete patches, and keep everything up to date when upstream moves forward. Think of it as a rebase-friendly fork that tracks exactly what you changed and why.
Quick Start
Five steps to your first patch set:
Import an upstream repository so GitForge has the objects to work with.
gitforge sync https://github.com/user/repoA patch set is anchored to a base branch. All patches are applied on top of that ref.
gitforge patch create "my-changes" --repo <id> --base mainThe patch set creates a materialized branch (patches/my-changes). Clone it and make your changes.
git clone <repo-url>
git checkout patches/my-changes
# make your edits...Push commits to the materialized branch. Each commit becomes a patch in the set when you extract them.
git add -A && git commit -m "harden SSH defaults"
git push origin patches/my-changes
# Extract pushed commits as patch records:
gitforge patch push --set <id>When the upstream branch moves forward, rebase your patch set to re-apply your patches on top of the new base.
gitforge patch rebase --set <id>API Reference
All endpoints require authentication via Bearer token or PAT.
/patch-setsCreate a new patch set
/patch-sets?repoId=<id>List patch sets for a repo
/patch-sets/:idGet a patch set with its patches
/patch-sets/:idUpdate name, description, auto-rebase, or visibility
/patch-sets/:idDelete a patch set
/patch-sets/:id/patchesAdd a patch (diff) to the set
/patch-sets/:id/extract-from-commitsExtract pushed commits as patches
/patch-sets/:id/materializeRebuild the materialized branch
/patch-sets/:id/rebaseRebase patches onto updated base
/patch-sets/:id/publishMake the patch set public
/patch-sets/:id/publishUnpublish (make private)
/patch-sets/:id/forkFork a public patch set
/patch-sets/:id/subscribeSubscribe to upstream updates
/patch-sets/:id/subscribeUnsubscribe
/patch-sets/:id/updatesCheck for upstream changes
/patch-sets/:id/updates/acceptAccept upstream updates
Sharing Patch Sets
Patch sets can be published for others to discover, fork, and subscribe to.
Publishing a patch set makes it visible on the /explore/patch-sets page and gives it a stable URL at /patches/:owner/:setName.
gitforge patch publish --set <id>Forking copies a public patch set into your account. You can modify it independently while optionally subscribing to upstream changes.
gitforge patch fork <setId> --name my-forkSubscribing to a forked patch set lets you receive notifications when the original author adds, modifies, or removes patches.
gitforge patch subscribe --set <id>
gitforge patch updates --set <id>
gitforge patch accept --set <id> --allEnable auto-rebase on a patch set and GitForge will automatically re-apply your patches whenever the base branch receives new commits. If a conflict is detected, the patch set status changes to conflict and the conflicting patch is flagged so you can fix it manually.
# Enable auto-rebase via CLI
gitforge patch update --set <id> --auto-rebase
# Or via API
curl -X PATCH /patch-sets/<id> \
-H "Authorization: Bearer <token>" \
-d '{"autoRebase": true}'