I have a problem while trying to commit and sometimes a comment have slightly changed in some way (eg different number of spaces like // Text
compared //Text
). This is annoying and I would like to know if there is a way to make git ignore commented lines. Since git may be unaware of file type, language and so on, I guess I could restrict myself to ignore changes in lines containing //
. My guess is that I could add some kind of rule for diff to ignore this, but there is another problem as well. How do I make git understand that these lines are supposed to be ignored in a comparison and still included in the repo?
EDIT As far as I know, this was done in svn. They had some smart implementation for this. My question is if there are something similar for git.