checkout
codebolt.git.checkout(path: string, branch: string): Promise<any>
Checks out a branch or commit 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 branch or commit to check out. |
Returns:
Promise<any>
A promise that resolves with the response from the checkout event.Status
Comming soon...
Example
await git.checkout('/path/to/repo', 'feature-branch')
Explaination
Check out a specific branch in the local repository. It has two parameter.
path: A string specifying the local repository path.
branch: A string specifying the branch name to be checked out.