For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Open sourceSupportFAQsDocs Home
DocumentationAPI ReferenceRelease notes
DocumentationAPI ReferenceRelease notes
  • Introduction
    • Overview
    • Authentication
  • Guides
    • Integration API routes
    • Operations Manager search APIs
    • Search API
    • URL query parameters
    • Use query parameters in API requests
  • Reference
        • POSTCreate a Git repository
        • POSTCreate a new branch in a repository
        • POSTInitialize a project in Git
        • GETList the available branches for a repository
        • GETRetrieve a project from Git
        • PUTUpdate a project in Git
LogoLogo
Open sourceSupportFAQsDocs Home
ReferenceGit

Create a new branch in a repository

POST
http://localhost:3000/git/:gitType/repos/:repoPath/branches
POST
/git/:gitType/repos/:repoPath/branches
$curl -X POST http://localhost:3000/git/GitHub/repos/repoPath/branches \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{}'
1{
2 "message": "Successfully created branch: exampleBranch"
3}
Creates a new branch in a repository.
Was this page helpful?
Previous

Initialize a project in Git

Next
Built with

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

gitTypeenumRequired
The name of the Git provider that is used
Allowed values:
repoPathstringRequired
The path in Git to the repository

Request

request body
originBranchstringOptional
The name of the branch inside a Git repository
newBranchstringOptional
The name of the branch inside a Git repository

Response

The result of creating a branch
messagestring

Errors

500
Internal Server Error