As an extension of this post: Can git ignore a specific line?, I am trying to ignore multiple lines in the same file type.
Is there a way to either;
- set multiple filters to the same
.gitattributes
filter for the same file or file types? (like below) OR
*.rs filter=filterA
*.rs filter=filterB
// to something like
*.rs filter=filterA + filterB
- add multiple rules to the same filter in
.git/config
? (like below)
[filter "filterA"]
clean = sed "/abc/d"
[filter "filterB"]
clean = sed "/def/d"
// to something like
[filter "filterC"]
clean = sed "/abc/d"
clean = sed "/def/d"
The above causes the last filter in .gitattributes
to overwrite the changes made from the first filter. I have also attempted something like clean = sed "/abc*def/d"
, but this did not work.