# Git checkouts fail on Windows with "Filename too long error: unable to create file"

*2020-07-29*

> Fix Git’s 'Filename too long' checkout error on Windows by enabling core.longpaths in the system Git configuration.

### Cause

According to the [msysgit wiki](https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path) on GitHub and [the related fix](https://github.com/msysgit/git/commit/8439375065bebbc6ba6850cf164c9b206efe4676) this error, **Filename too long**, comes from a Windows API limitation of file paths having 260 characters or fewer.

### Resolution

To resolve this issue, run the following command from GitBash or the Git CMD prompt (as administrator):

```sh
git config --system core.longpaths true

```

This will allow file paths of 4096 characters.

