This is a smart solution.
It would be also nice if you could define something like this:
ignore lines N to M in file XYZ
Because most configuration stuff in tiny scripts are at the top of the script. Or if you want to ignore hundreds of lines at once you don’t want to edit each single line.
Example in .gitignore
to ignore line 1 to 100 in file script.php
:
*.log
build
script.php:1:100