You can find the answer in this tutorial (“Convert lfs file to pointer” section).
Also, when cloning a repo, it’s a good idea to prepend GIT_LFS_SKIP_SMUDGE=1
to the command to download non-LFS files (and LFS pointers) only and save disk space. You can still download the content of LFS files later if you need it with git lfs pull -I path_to_lfs_file
.