LogoFreestyle
API Reference/Git

Set repository default branch

Set the default branch name for a repository. This will update the HEAD reference to point to the new default branch.

PUT/git/v1/repo/{repo_id}/default-branch

Request Body

application/jsonRequired
defaultBranchRequiredstring

Path Parameters

repo_idRequiredstring

The repository ID

Format: "uuid"

Response Body

200

Success

responseRequiredobject
curl -X PUT "https://api.freestyle.sh/git/v1/repo/497f6eca-6276-4993-bfeb-53cbbbba6f08/default-branch" \
  -H "Content-Type: application/json" \
  -d '{
    "defaultBranch": "string"
  }'

Success

{}