LogoFreestyle
API ReferenceGit

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

Path Parameters

repo_id*string

The repository ID

Formatuuid

Request Body

application/json

defaultBranch*string

Response Body

application/json

application/json

application/json

application/json

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"  }'
{}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}

Freestyle AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details with the official documentation.

How can I help?

Ask me about Freestyle while you browse the docs.