# Cloning repos with VS Code

VS Code can control the entire Git workflow, from the clone, right through to the commit and virtually anything else.

{% tabs %}
{% tab title="Exercise" %}

* Fork the sample project
  * <https://github.com/burkeholland/i-love-lamp>
* Clone the sample project into the "exercise-7-git-source-control/start" folder
* Open the cloned project in VS Code
  {% endtab %}

{% tab title="Answer" %}

* Navigate to [https://github.com/burkeholland/i-love-lamp](https://github.com/burkeholland/i-love-lamp.git)
* Click the "Fork" button

![](https://1151923643-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlvtEHKkq5bvzPq1pJ4%2F-Lm7J5XWhGtdh-tmTHrr%2F-Lm7KGkSZHVudtTvY5ry%2Fimage.png?alt=media\&token=96e34ec4-c78e-4cad-9305-3534a54e2350)

* On your forked repo, find the "clone or download" button and copy the URL&#x20;

![](https://1151923643-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlvtEHKkq5bvzPq1pJ4%2F-Lm7J5XWhGtdh-tmTHrr%2F-Lm7L-XbeACVQt2WQwYW%2Fimage.png?alt=media\&token=b87577a0-44f2-476a-920d-b556e1f38e20)

* Open the  "exercise-8-git-source-control" folder in VS Code
* Open the Command Palette (**Cmd/Ctrl + Shift + P**) &#x20;
* Select "Git Clone"

![](https://1151923643-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlvtEHKkq5bvzPq1pJ4%2F-Lm7J5XWhGtdh-tmTHrr%2F-Lm7LE3QHkT8S8do-FUj%2Fimage.png?alt=media\&token=8f1c55d6-4c25-495d-bd54-8e632553f14b)

* Paste in the URL that you copied from Github

![](https://1151923643-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlvtEHKkq5bvzPq1pJ4%2F-Lm7LJlnCld0z39JcA-0%2F-Lm7LsDSZz8Gb28p8XEq%2Fimage.png?alt=media\&token=d661b9c3-caaa-4b6d-9680-a23853e6cd89)

* Select the "start" folder in "exercise-8-git-source-control" folder

![](https://1151923643-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlvtEHKkq5bvzPq1pJ4%2F-Lm7LJlnCld0z39JcA-0%2F-Lm7M2vW6oxdSZh_s3Mt%2Fimage.png?alt=media\&token=72a2090b-475f-44ff-af84-3b3c85e0ebf2)

* Click "Select Repository Location"
* Open a new instance of VS Code directly on the cloned "i-love-lamp" folder

```
cd exercise-8-git-source-control/start/i-love-lamp
code .
```

{% endtab %}
{% endtabs %}
