> For the complete documentation index, see [llms.txt](https://ploegert.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ploegert.gitbook.io/til/tools/git/whitespace-warnings.md).

# Whitespace Warnings

You can configure git to warn you about whitespace issues in a file when you diff it. This is handled by the `core.whitespace` configuration. Add the following to your `.gitconfig` file:

```
[core]
      whitespace = warn
```

By default, git will warn you of trailing whitespace at the end of a line as well as blank lines at the end of a file.
