Work with branches

Branches and tags are refs scoped to a project_id. Manage them with REF_UPDATE and REF_DELETE under compare-and-swap (CAS) semantics.

Advance a branch interactively

Advance a branch
1
Select a project
Loading projects...
2
Push commit and update ref

This live demo advances refs/heads/main with REF_UPDATE after submitting a COMMIT_BUNDLE. The remaining ref operations below use the same project-scoped authorization model and CAS semantics.

Next step
Fork a project

Core operations

  • create a ref with REF_UPDATE and empty old_hash
  • advance a ref with REF_UPDATE
  • reset a ref with REF_UPDATE and force = true
  • delete a ref with REF_DELETE

Notes

  • refs are project-scoped
  • the acting principal is owner_address
  • ref updates use CAS semantics
  • deleting a ref does not delete commit metadata

Learn more

Next steps