I need to ignore some lines from some files which contains timestamp when thoses files are generated. Sometimes we generates thoses files but the only change in the file is the timestamp which we don't care and the file should not be targeted to be commited by the git status.
I know I can use git filters like on this topic : How to tell git to ignore individual lines, i.e. gitignore for specific lines of code
But in that case it's deleting lines when I do git add. I want thoses lines to be commited if there is another change in the file than the timestamp (timestamp line will be ignored). But if the change is only the timestamp line I don't want the file to be commited.
How I can do that using git filters ?
Thanks