I'm trying to estimate the storage requirements for my project on GitHub and have a few questions about how git-lfs stores multiple versions of files:
- Are multiple versions of files stored by git-lfs?
- If so, will every change to a file result in the complete file being replicated, or are only differences stored?
- Will all versions count towards the quota on github?
- Is there any way to control how many versions are kept?
Answering your questions:
Are multiple versions of files stored by git-lfs?
Yes. All file versions are stored by git-lfs.
If so, will every change to a file result in the complete file being replicated, or are only differences stored?
Yes. Every little change results in a new complete file stored.
Will all versions count towards the quota on github?
Yes. Every time a new version is pushed, the total file size is counted against your quota.
Is there any way to control how many versions are kept?
No. Git LFS hasn't a feature to do that yet.
See more details here.
Even with Git-LFS 2.0 (released two days ago, mainly locking and transfert queue), the general principle remains the same.
Nothing in the official LFS spec mentions delta storage: Each version counts in full, and as commented on issue 1101
So controlling how many versions are kept, or having some kind of rolling storage (where n+1 version get dropped), is still to be implemented.
There are many questions around that type of feature: