⌘K
Options (5)
-n, --no-checkoutbooleanClone only the `.git` directory of an existing repository
Example:
git clone {{[-n|--no-checkout]}} {{remote_repository_location}}-l, --localbooleanClone a local repository
Example:
git clone {{[-l|--local]}} {{path/to/local_repository}}-q, --quietbooleanClone quietly
Example:
git clone {{[-q|--quiet]}} {{remote_repository_location}}-b, --branchbooleanClone an existing repository only fetching a specific branch
Example:
git clone {{[-b|--branch]}} {{name}} --single-branch {{remote_repository_location}}-c, --configbooleanClone an existing repository using a specific SSH command
Example:
git clone {{[-c|--config]}} core.sshCommand="{{ssh -i path/to/private_ssh_key}}" {{remote_repository_location}}Examples (8)
Clone an existing repository into a new directory (the default directory is the repository name)
git clone remote_repository_location path/to/directoryClone an existing repository and its submodules
git clone --recursive remote_repository_locationClone only the `.git` directory of an existing repository
git clone [-n|--no-checkout] remote_repository_locationClone a local repository
git clone [-l|--local] path/to/local_repositoryClone quietly
git clone [-q|--quiet] remote_repository_locationClone an existing repository only fetching the 10 most recent commits on the default branch (useful to save time)
git clone --depth 10 remote_repository_locationClone an existing repository only fetching a specific branch
git clone [-b|--branch] name --single-branch remote_repository_locationClone an existing repository using a specific SSH command
git clone [-c|--config] core.sshCommand="ssh -i path/to/private_ssh_key" remote_repository_locationmade by @shridhargupta | data from tldr-pages