update_default_branch
Change a GitLab project's default branch to control clone, merge request, and CI defaults. Requires maintainer permission and returns the updated project.
Instructions
Change the default branch of a project. Use this to change which branch GitLab treats as the project's default; use create_branch to create a branch rather than changing project defaults. The operation changes project settings and may affect clone, merge request, and CI defaults, requires project-maintainer permission, and returns the updated project or a validation/permission error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| default_branch | Yes | The new default branch name for the project |