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.
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:
cdto your repository.
git statusto be sure you have a clean working tree and Index. If not clean, either commit or stash away your local modifications.
bash.exeto enter Git's shell.
git ls-files | grep <readable-part-of-the-file-name>.
git rm --cached "`printf "<path-to-file>"`"(Note: all the quotes are necessary!).
On Windows, you may also work without
git commit -m "clean up bad encoding of file names".
git add .and finally commit with
git commit --amend -m "clean up bad encoding of file names".