Skip to main content

init

plugin.git.init(path: string): Promise<GitInitResponse>

Initializes a new Git repository at the given path.

Parameters

ParameterTypeRequiredDescription
pathstringYesThe file system path where the Git repository should be initialized.

Returns

Promise<GitInitResponse> — A promise that resolves with the response from the init event.

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.git.init('path');
console.log(result);