Branch protection is a set of policy operations you can embed in the JWT that authenticates a Git remote URL. Each generated URL carries its own rules, so you can hand out a protected URL to one client and an unrestricted URL to another against the same repository. Today, branch protection covers a single policy. More are planned.Documentation Index
Fetch the complete documentation index at: https://code.storage/docs/llms.txt
Use this file to discover all available pages before exploring further.
Available policies
| Policy | Constant | Effect |
|---|---|---|
no-force-push | OP_NO_FORCE_PUSH (TypeScript/Python) / OpNoForcePush (Go) | Rejects any non-fast-forward ref update. Fast-forward pushes — including git push --force when the new commit is a descendant — still succeed. |
Applying a policy
Policies are applied at the moment a remote URL is signed. Pass them via theops parameter on any of the URL-generating SDK methods:
getRemoteURL()— the standard repository remote.getImportRemoteURL()— the+importpush namespace.