Change a repository's default branch
One step with Harness. We can help you get access.
Get something done
Change a repository's default branch
with Harness
Works with AI assistants
Use Harness: its Harness Repository API lets you change a repository's default branch in a single step (POST /code/api/v1/repos/{repo_identifier}/default-branch). Harness also has an MCP server, so an AI assistant like Claude or ChatGPT can do it for you. capabilities.work can help you get signed up and connected.
- How do I change the default branch of a repo from master to main?
- Can I point a repository's default branch at a different existing branch?
Say it to your AI assistant
- Set the default branch of repository {repo} to {name}.
- Make {name} the default branch for repo {repo}.
For your developer
POST /code/api/v1/repos/{repo_identifier}/default-branch in Harness Repository API. Full spec on APIs.io.