59

I'm using git 2.5.4 on Mac OS X.

I have filenames containing é and git is displaying it with escapes. Is there a way to make it use unicode and show the character? The terminal can obviously handle it.

> ls
Sél

> git status
Untracked files:
(use "git add <file>..." to include in what will be committed)
...
"S\303\251l"

I'd like that file to display as Sél, not S\303\251l.

CodeWizard
  • 110,388
  • 20
  • 126
  • 153
Rob N
  • 12,931
  • 12
  • 81
  • 149

1 Answers1

101

Check first if git config core.quotePath false helps.

git config --global core.quotePath false

If not, as stated in "Git and the Umlaut problem on Mac OS X", try:

git config --global core.precomposeunicode true

From git config man page:

core.precomposeUnicode

This option is only used by Mac OS implementation of Git.
When core.precomposeUnicode=true, Git reverts the unicode decomposition of filenames done by Mac OS.

sanmai
  • 26,245
  • 12
  • 59
  • 74
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
  • 4
    Thanks! Solved my long lasting frustration when working with Russian- and Lithuanian-named filenames. – Emil May 30 '17 at 07:24
  • 1
    although `git config --global core.precomposeunicode true` "is only used" for Mac, it helps solved my problem with unicode on Windows – Luke Jul 14 '21 at 03:39