pre-commit exclude files
When using Git
pre-commit hooks
with the wide range of files typical of scientific computing, it may occur that the hooks modify files that should be excluded, such as FITS files that have a text header and a binary data part.
Exclude such files by using case-insensitive regex patterns in the .pre-commit-config.yaml file by top level
exclude key, for example to case-insensitively exclude files with the .fit or .fits extension, use:
exclude: (?i)\.fits?$