3

Using .gitattributes file at a GIT repository I can tell the system how to manage some files concerning differences, end of line substitution and so on.

I wonder if, by the same or other mechanism, is it possible to tell git not to take case differences as file differences. That would be very useful to manage old VB6 code whose case is continuously change by its IDE.

  • Git will always store the full contents of each revision of every file (and remember that case changes in string literals are still significant, even in a case-insensitive language). There's probably a way to persuade `git show` and `git diff` to do the equivalent of `diff -i` (case-insensitive diff), but they don't accept `-i` on the command line (which is odd, because they do accept `-w` to ignore whitespace changes). – Keith Thompson May 08 '14 at 15:31
  • @KeithThompson If something like `.gitattributes` worked for my purpose I could isolate all string constants in a file with a name pattern not matching the case insensitivity rule at `gitattributes` file. – Pablo Francisco Pérez Hidalgo May 08 '14 at 15:35
  • Possible duplicate of [Git - Discard case only changes](https://stackoverflow.com/questions/17868854/git-discard-case-only-changes) – StayOnTarget Jan 10 '19 at 20:54

0 Answers0