Problem
On macOS, a file whose name contains a Unicode combining character is handled inconsistently. One or more of these symptoms appear:
- The Commit tool window lists the file under Unversioned Files, but its diff shows
Cannot show diff: file not found. - The commit completes and the file is not included. No error is reported.
- The Project view shows the file in the default color instead of the unversioned color, so the file looks like it is already tracked.
- A Markdown or HTML link that points at the file is reported as unresolved.
- The file name is displayed with an extra space before the affected character.
Only files created or renamed outside the IDE are affected, for example in Finder, in a terminal, or by a script. Files created in the IDE work correctly. Running git add in a terminal does not correct the IDE-side state.
Such names are common in Japanese. A voiced or semi-voiced kana such as ブ or ポ can be stored as the base kana plus a separate combining mark. Accented Latin text does the same: ä can be stored as a plus a combining diaeresis.
Reproduced in IntelliJ IDEA 2026.2.
Cause
The same name can be stored in two forms. In the precomposed form (NFC) ブ is a single character. In the decomposed form (NFD) it is a base character plus a combining mark. macOS accepts both and treats them as the same file. The IDE and Git do not.
core.precomposeUnicode is set to true in every repository created on macOS by git init or git clone. Git therefore reports the path in precomposed form. The IDE holds the name as it is stored on disk, in decomposed form. The two names are equivalent and not identical, so the IDE cannot match Git's report to the file on disk. The status is then not applied, the diff cannot be resolved, and the commit skips the path.
Set core.precomposeUnicode to false and the symptoms disappear. That is not a fix. With the flag disabled, Git stores decomposed paths in the repository. A later checkout on Linux or Windows produces decomposed file names, and any reference written in precomposed form stops resolving there.
Related issues: File references fail to resolve for Unicode NFD filenames for unresolved file references, Unnatural spaces are inserted in Japanese-named files and directories created outside IntelliJ for the name display.
Resolution
Rename the file to be in precomposed form – NFC, not NFD - decomposed. This way the IDE and git will both have the same file name stored.
Comments
0 comments
Please sign in to leave a comment.