> For the complete documentation index, see [llms.txt](https://burkeholland.gitbook.io/vs-code-can-do-that/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://burkeholland.gitbook.io/vs-code-can-do-that/exercise-8-git-and-source-control/cloning-repos-with-vs-code.md).

# 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

![](/files/-Lm7KGkSZHVudtTvY5ry)

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

![](/files/-Lm7L-XbeACVQt2WQwYW)

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

![](/files/-Lm7LE3QHkT8S8do-FUj)

* Paste in the URL that you copied from Github

![](/files/-Lm7LsDSZz8Gb28p8XEq)

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

![](/files/-Lm7M2vW6oxdSZh_s3Mt)

* 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://burkeholland.gitbook.io/vs-code-can-do-that/exercise-8-git-and-source-control/cloning-repos-with-vs-code.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
