Background

The Index file (.git/index) contains meta-information related to the working tree and is constrained by Git to have exactly one entry per file (and stage level). While Git handles file names as raw byte-sequences, SmartGit interprets them as (Unicode-)Strings to display them more nicely. Certain parts of a byte sequence may not represent a valid encoding, hence the relevant parts of the byte sequence will be replaced by the 'Unicode replacement character ' (�, U+FFFD). If the Index contains two byte sequences which differ only in 'unconvertible' parts, the resulting Strings may be identical. Such Index entries are confusing (not only SmartGit) and need to be fixed.

This kind of problem might occur after updating to msysgit 1.7.10 and not properly converting non-unicode file names.

Resolution

If an encoding problem in the Index is encountered, SmartGit will show an error message which contains information about the problematic file. The resolution is performed using Git from the command line:

On Windows, you may also work without bash.exe: just open a command line (DOS box) and invoke git rm --cached <path-to-file-pattern> with <path-to-file-pattern> being an unambiguous pattern of the file's path where the non-ASCII characters are replaced by ?. E.g.: x?y.txt.