I thought that `git lfs migrate` rewrote the history of a repo so that specified large files were kept in LFS. This means that the repo should get smaller, because it doesn't directly contain all versions of large files. However, when I run

`git lfs migrate import --include="test-data/**" --include-ref=refs/heads/master`

All of the files in the `test-data/` directory are replaced with files that look like this:

```
version https://git-lfs.github.com/spec/v1
oid sha256:5853b5a2a95eaca53865df996aee1d911866f754e6089c2fe68875459f44dc55
size 19993296

```

And the .git folder becomes twice as large (400MB to 800MB). I am confused. What's `git lfs migrate doing`?

Edit: I did [clean after migration](https://github.com/git-lfs/git-lfs/wiki/Tutorial)

```
git reflog expire --expire-unreachable=now --all
git gc --prune=now

```

before running `du`. Afterwards, most of the space is used by these folders:

414M .git/objects
398M .git/lfs