I have a git repo with several directories, and a single file, `MyFile.ext`.

```
/
  LargeDir1/
  LargeDir2/
  LargeDir3/
      .
      .
      .
  MyFile.ext

```

I'd like to start a new repo with just `MyFile.ext` in it, and keep all the history pertaining to it, but ignore everything else (all the `LargeDir`s). How can I do this?

For directories, I've successfully used [this answer](https://stackoverflow.com/a/17864475/817630), but I tried that on a single file, and it doesn't work.

I've also tried [this answer](https://stackoverflow.com/a/3910697/817630), which does delete everything except my file, but it also seems to leave all the history around.