> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# How to create your squarecloud.ignore file

> Learn how to exclude files from Square Cloud deployments with squarecloud.ignore

## What is the `squarecloud.ignore` file?

The `squarecloud.ignore` file defines which files and folders should be excluded when you upload or deploy an application. It works with the Square Cloud VS Code extension and the Square Cloud CLI.

Its syntax is similar to a `.gitignore` file, so you can use comments, patterns, directory rules and negation rules.

## Creating the file

Create a file named `squarecloud.ignore` in the root of your project.

```gitignore theme={null}
# Local dependencies
node_modules/

# Local and secret files
.env
.env.*

# Keep the deployment small
*.log
```

<Info>The file must be named exactly `squarecloud.ignore`</Info>

## Syntax

Each line is a rule. A matching file or folder is excluded from the deployment.

| Pattern        | Matches                                                  |
| -------------- | -------------------------------------------------------- |
| `file.txt`     | A file with this name in the same directory as the rule. |
| `/config.json` | `config.json` at the project root.                       |
| `logs/`        | Every directory named `logs` and its contents.           |
| `*.log`        | Files ending in `.log`.                                  |
| `**/cache/`    | A `cache` directory at any depth.                        |
| `# comment`    | A comment; it does not exclude anything.                 |

<Note>Use `/` for directory separators in patterns, including on Windows.</Note>

## Common examples

Exclude development tools, generated files and local secrets while keeping production files in the deployment:

```gitignore theme={null}
# Dependencies and tooling
node_modules/
.vscode/
.idea/

# Environment files
.env
.env.local

# Generated files
coverage/
__pycache__/
*.log

# Ignore all temporary files
*.tmp
*.cache

```

## How it is applied

The VS Code extension and the CLI read `squarecloud.ignore` when preparing the files for upload or deployment. Files that match an ignore rule are left out of the content sent to the production environment.
Keep files required at runtime, such as the `MAIN` file from your configuration, outside the ignored paths.
