EDIT: After a couple of years of using GIT LFS successfully, and a number of up/down votes on this answer, I think this warning still applies: GIT LFS has a lot of flaws, such as difficult management of which files should be in LFS, performance issues when (accidentally) adding many small files to LFS on Windows, limited support for multiple remotes and remote URL formats, difficulty removing files from LFS, various problems you can run into when merging, etc. GIT LFS is a foreign element in GIT that exists outside the revision tree. I would, however, like to rephrase my original warning as follows:
- Only put files into GIT LFS that you would normally put into GIT (e.g., "source files" that you own and change occasionally)
- Only put large files into GIT LFS.
- If you need a system for managing binary dependencies, consider using a package manager instead.
- Don't use Subversion as a replacement for GIT LFS. It is worse.
- Be prepared to mess up your working directory. Make sure to back up (push) valuable changes before you do any major changes to LFS.
- When merging, always merge
.gitattributes
first.
EDIT: Here is my original answer:
It is difficult remove anything from GIT LFS, and although the solutions presented here may work (with modifications), they require a lot of effort and may have side effects on your repository.
If you arrived here, it is time to ask yourself whether you want to manage your large files with GIT LFS and whether GIT itself (which is inherently bad at managing large files, because it is a distributed version control system) was a good choice.
If you have many large files and you are a single organization working on your project, something like Subversion may work better for you.