> For the complete documentation index, see [llms.txt](https://www.pranaypourkar.co.in/the-programmers-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pranaypourkar.co.in/the-programmers-guide/git/workflows/repository-management/working-directory.md).

# Working Directory

## About

In Git, the **working directory** (also called **working tree**) is the part of our local Git repository **where we see and modify actual files**.

**Example:**

When we run:

```bash
git clone https://example.com/your-repo.git
```

Git will:

1. Download the `.git` directory (where all Git history, configuration, and metadata live),
2. And also **extract all files from the latest commit** into our current directory.

That visible folder with code files, docs, configs, etc., is our **working directory** — it's what we edit.

## How Is It Different From a **Bare Repository**?

<table><thead><tr><th width="145.3828125">Type</th><th width="158.7109375">Contains Git History</th><th width="259.203125">Contains Files You Edit (Working Dir)</th><th>Typical Use</th></tr></thead><tbody><tr><td>Regular repo</td><td><code>.git</code> folder</td><td>Working directory (code files)</td><td>Development, coding</td></tr><tr><td>Bare repository</td><td>Git data only</td><td>No working directory</td><td>Backup, remote host</td></tr></tbody></table>

**Bare repo example:**

```bash
git clone --bare https://example.com/repo.git
```

* Creates `repo.git/`
* Inside: only Git history and metadata
* **No** code files — we can't run or edit the project here


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.pranaypourkar.co.in/the-programmers-guide/git/workflows/repository-management/working-directory.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
