Skip to content

Home

Clone a repository

Clones an existing repository, creating a local copy of it.

git clone <url> [<directory>]

# Examples
git clone https://github.com/30-seconds/30-seconds-of-code.git
# Clones the repository in a new directory named '30-seconds-of-code'
cd 30-seconds-of-code

git clone https://github.com/30-seconds/30-seconds-of-code.git my-project
# Clones the repository in a new directory named 'my-project'
cd my-project

More like this

Start typing a keyphrase to see matching snippets.