Git operations
clone
git.clone(repository, callback)
Clones repository to temporary directory. You will get location where repository is cloned to in console output.
Supports:
- shallow clone
- multiple repositories
- custom branch
callback
Parameters
Can be a repository or array of repositories which you need to clone.
By default shallow cloning is performed with --depth 1 --single-branch
. You can specify branch
to clone specific (not default branch).
If you want to disable shallow clone, you can provide it with extended configuration.
A callback which will be executed for each repository. First argument is an object with subcommands. It can be destructured to get access to subcommands.
Returns
Was this page helpful?