published by | Adam Johnson |
---|---|
in blog | Adam Johnson |
original entry | pre-commit: Block files based on name with a custom “fail” hook |
pre-commit’s “fail” virtual language fails all files that it matches. Combine it with pre-commit’s file name and type matching to block unwanted files in your repository.
Let’s try it out …