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
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_UPDATEand emptyold_hash - advance a ref with
REF_UPDATE - reset a ref with
REF_UPDATEandforce = 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
- Fork a project — create a descendant project from an anchored source ref
- Open a merge request — understand how branch and fork state feed into proposals