I'm confused about gitattributes.
I'm not sure if what I'm trying to do is possible: I have a settings file that my IDE is generating for my project and this file get's updated very often. It's basically a text file but it's recommended not to edit it in text mode. I allow my self adding and editing certain parts of the file but I let the IDE's GUI do the rest because otherwise I may encounter problems.
Part of the file is changed by the GUI and some of it is changed by me. I want git to ignore changes or added lines that the GUI does but keep track of changes that I make.
I can fit into a pattern the changes that the GUI and vise-versa. For example, the command below can print only the lines I want to tell git to track:
egrep -v (WORDS|THAT|APPEAR|IN|LINES|I|DON'T|WANT|GIT|TO|TRACK) <setting-file>
I came across gitattributes
here and here. So I created a filter with the command above and I put it in smudge
and clean
in my ~/.gitconfig
. I've managed to make it work but The problem is: I don't want git to actually remove the lines that don't get through the filter. I just want git to ignore any changes to these lines.
Hope I made myself clear.