clone
codebolt.git.clone(url: string, path: string): Promise<any>
Clones a Git repository from the given URL to the specified path.
Parameters
Name | Type | Description |
---|---|---|
url | string | The URL of the Git repository to clone. |
path | string | The file system path where the repository should be cloned to. |
Returns:
Promise<any>
A promise that resolves with the response from the clone event.Status
Comming soon...
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.