Is there a cleaner way to make Git just ignore some of my changes and never comment on them? .gitattributes:
config_to_be_deviated.xml filter = qqq
.git / config:
[filter "qqq"]
clean = "perl -ne 'print unless / git_please_dont_look_here /'"
smudge = (Q = $ (mktemp) && cat> $ Q && patch -s $ Q </ tmp / pp && cat $ Q && rm $ Q)
The patch / tmp / pp adds my changes with "git_please_dont_look_here" on each line. Git deletes all such lines before getting the file to the repository and reads my changes when checking it; I can continue to add and make useful changes to config_to_be_deviated.xml , but the changes in the patch will not be visible with Git.
source share