Skip to main content

add

codebolt.git.add(path: string): Promise<any>
Adds changes in the local repository to the staging area at the given path.

Parameters

NameTypeDescription
pathstringThe file system path of the local Git repository.

Returns:

 Promise<any>
A promise that resolves with the response from the add event.

Status

Comming soon...

Example


await git.add('/path/to/repo/file.txt')

Explaination

Add changes in the specified directory to the staging area. It has one parameter.

path: A string specifying the path of the directory or files to be added.