Relative Content

Tag Archive for gitgit-lfs

How to make checkout of a repository using git-lfs fail if git-lfs isn’t installed

It seems that if you try to clone & checkout a git repository which makes use of git-lfs, while the current machine doesn’t have git-lfs installed, it simply ‘works’ without any errors or warnings, but ‘does the wrong thing’ (by checking out ‘pointer’ files instead of what they point to, if they’re being managed by git-lfs)

Git/GitLab – reject commits with raw binary files instead of LFS pointer files

We are using Git LFS to store .png files in our GitLab repository. However, there is a possibility a commit will contain a raw .png file instead of a Git LFS pointer file. (For example, someone might not have Git LFS installed and push a raw file to the repo, or they might commit & push without git hooks). If neither the author nor the reviewee notices & the file ends up in the main branch, the image will end up permanently hogging up space in the history of the repo.