Session Ready
Exercise

How can I create a copy of an existing repository?

Sometimes you will join a project that is already running, inherit a project from someone else, or continue working on one of your own projects on a new machine. In each case, you will clone an existing repository instead of creating a new one. Cloning a repository does exactly what the name suggests: it creates a copy of an existing repository (including all of its history) in a new directory.

To clone a repository, use the command git clone URL, where URL identifies the repository you want to clone. This will normally be something like

https://github.com/datacamp/project.git

but for this lesson, we will use a repository on the local file system, so you can just use a path to that directory. When you clone a repository, Git uses the name of the existing repository as the name of the clone's root directory, for example:

git clone /existing/project

will create a new directory called project inside your home directory. If you want to call the clone something else, add the directory name you want to the command:

git clone /existing/project newprojectname
Instructions
100 XP

You have just inherited the dental data analysis project from a colleague, who tells you that all of their work is in a repository in /home/thunk/repo. Use a single command to clone this repository to create a new repository called dental inside your home directory.