Skip to main content

clone

codebolt.git.clone(url: string, path: string): Promise
Clones a Git repository from the given URL to the specified path.

Parameters

NameTypeDescription
urlstringThe URL of the Git repository to clone.
pathstringThe file system path where the repository should be cloned to.

Example


await git.clone('https://github.com/user/repo.git', '/path/to/local/repo')

Explaination

Clone an existing Git repository from a given URL to a local directory. It has two parameter.

url: A string specifying the remote repository URL.

path: A string specifying the local directory path where the repository should be cloned.