I work on a git-lfs repository. Some colleagues occasionally need to update large binary files in this repository (hence git-lfs). Not all colleagues have git-lfs installed. They will not do it unless they need to. But once they want to commit/push, they have forgotten they need git-lfs... Which leads to "pollution" of the repository with actual files.
Is there a way to enforce the use of git-lfs by software? So I can only commit/push to the repo if I have git-lfs installed?
Edit: This question is similar Azure devops - server-side git hooks but I hoped there was a client-side solution. I thought the pre-commit hook could also be used for this.
Update: I see how git-hooks won't help because again I my collegues would need actively do something - which they probably won't. This explicit action is necessary because git-hooks would introduce massive security holes if not enabled with the users explicit consent. (https://stackoverflow.com/a/23771013/1635906)
Update: So I am ready to create a branch-policy which makes sure a CI build is executed. The build should fail if there are files that should be pointers. There is " List files not tracked by Git LFS " but it aims at bash. My Azure DevOps (on-premise) runs on windows and therefore cmd/powershell. I need a command that is similar to the behavior of the message I get on clone: "Encountered 11 file(s) that should have been pointers, but weren't" And then it should either print to STDERR or result in a non-zero exit code.