delete_branch
Remove a remote GitLab branch permanently, verifying the branch name and protection status first. Requires branch-delete permission to avoid unintended data loss.
Instructions
Delete branch from project. Use this only after confirming the branch name and intended data loss; use get_branch or list_branches before deletion and never use it to remove branch protection. The operation permanently removes a remote branch, requires branch-delete permission, and returns the deletion result or a protected-branch, missing-resource, or permission error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| branch_name | Yes | Name of the branch to delete |