# repository/local-files

> Reports a tracked file at a path that a configuration keeps out of Git.

Reports a tracked file at a path that a configuration keeps out of Git.

Part of the [`repository`](/reference/configurations/repository/) configuration, at the `recommended` [level](/start/concepts/#levels). It runs at the `commit` [stage](/start/concepts/#stage), once for the repository. gspot runs this check itself.

## Why

Machine-local values and installed packages belong outside shared Git history.

## What to do

Add the reported file or folder to .gitignore and remove it from the index with `git rm --cached`.

## Example

A tracked `.env` reports `tracked-file`. Add the path to `.gitignore`, then run `git rm --cached .env`, which keeps the file on disk.

## Turn it off

Turn it off for some files, with a reason:

```shell
gspot ignore repository/local-files --paths "<glob>" --reason "<why>"
```
