# gh repo clone

Clone with shorthand, no full URL.

## Quick answer
```
gh repo clone cli/cli
```

## Syntax
```
gh repo clone <repository> [<directory>] [-- <git-clone-flags>]
```

## Examples

# Clone by owner/name shorthand
gh repo clone cli/cli

# Clone into a specific folder
gh repo clone cli/cli my-cli

# Clone one of your own repos (owner optional)
gh repo clone my-project

# Shallow clone by passing git flags after --
gh repo clone cli/cli -- --depth=1

## Key flags

  -u, --upstream-remote-name	Name for the upstream remote when cloning a fork (default "upstream").
  -- <git flags>	Everything after -- is passed straight to git clone (e.g. --depth, --branch).

Full guide: https://ghcli.com/gh-repo-clone.php
