git_clone
Clone a remote Git repository to a local directory, with options to specify a branch and shallow clone depth for partial history.
Instructions
Clone a remote repository from url into local_path, optionally pinning a branch or shallow depth. Use this when starting work on an existing project, when a full history is not needed (depth), or when a local copy must be created from a remote. Does NOT initialize a new empty repository — use git_init for that. Best for: fetching an existing repository to work on locally. Returns: confirmation text with the local path; refuses non-empty destinations, so the target must be missing or empty.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Remote repository URL to clone from | |
| depth | No | Shallow clone depth, 1 for full history | |
| branch | No | Branch to check out after cloning | |
| local_path | No | Local directory to clone into, defaults to '.' (the server working directory) | . |