When I commit a git lfs tracked file (without pushing) two things happen, as far as I understand:
- The file is copied to the local lfs object storage (
.git/lfs/objects
) - The file is replaced with an lfs pointer file in the commit, but not in the working copy.
Under what circumstances can the file disappear from the local lfs object storage?
Since the branch has not been pushed yet, not even git prune
should be able to delete local lfs objects according to the manual.
Yet, I keep running into issues with not being able to check out some branches, because of missing lfs objects. The error message refers to the objects not being on the server, but the branch has not been pushed anyway.