branch
codebolt.git.branch(path: string, branch: string): Promise<any>
Creates a new branch in the local repository at the given path.
Parameters
Name | Type | Description |
---|---|---|
path | string | The file system path of the local Git repository. |
branch | string | The name of the new branch to create. |
Returns:
Promise<any>
A promise that resolves with the response from the branch event.Status
Comming soon...
Example
await git.branch('/path/to/repo', 'new-branch')
Explaination
Creates a new branch in the local repository.It has two parameter.
path: A string specifying the local repository path.
branch: A string specifying the new branch name.