PatchHub
Also available as Markdown for agents

Git on PatchHub

Every PatchHub project is a git repository over HTTPS.

Clone

git clone https://patchhub.sh/<owner>/<project>.git

Public projects clone without a password.

Private projects need your username and an access token (from https://patchhub.sh/settings) as the password.

Branches

BranchMeaning
mainThe main version.
patches/<id>Each published patch, applied on the version it was made for.

PatchHub's internal refs are hidden.

Push

When git asks, use your PatchHub username, and an access token as the password.

Push main (maintainer)

git push patchhub HEAD:main

This updates the main version. PatchHub re-applies everyone's patches on top of it automatically.

Push any other branch: a draft patch

git push patchhub HEAD:dark-mode

PatchHub turns the branch into your draft patch and prints its link.

Push the same branch again to update that draft.

Then publish it on the website, or with publish_patch / POST /api/v1/patches/{id}/publish.

The branch must start from main's history (clone first, then commit).

Push a tag: a version (maintainer)

git tag v1.0 && git push patchhub v1.0

An annotated tag's message becomes the version notes.

Refused pushes

MessageWhyWhat to do
only the maintainer can push to mainYou don't maintain this projectPush a branch instead; it becomes your patch.
main can't be deletedDeleting main is blocked
patches/* branches are managed by PatchHubThose mirror published patchesUse another branch name.
only the maintainer can push tagsTags are versionsAsk the maintainer.
this branch doesn't share history with mainYour branch started elsewhereClone the project, then commit on top.
Authentication failedWrong username or tokenCreate a new token at https://patchhub.sh/settings.