Skip to main content

createBranch

client.git.createBranch(data: GitCreateBranchRequest): Promise<unknown>

Creates a new Git branch.

Creates a branch with the specified name, optionally based on a given starting point (commit, tag, or another branch).

Parameters

ParameterTypeRequiredDescription
dataGitCreateBranchRequestYesBranch creation parameters including the new branch name

Returns

Promise<unknown> — A promise that resolves when the branch has been created

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.git.createBranch(/* GitCreateBranchRequest */);
console.log(result);