Search code examples
gitencodingcygwintortoisegit

When use TortoiseGit with cygwin. Commit error


I'm Korean. So we use Korean file name. But I use TortoiseGit with Cygwin. Commit error. When I use TortoiseGit, This error Message. But I use Cygwin it will work.

This is error Message.

git.exe update-index [...]
/usr/bin/bash: /bin/git.exe update-index -- "새 텍스트 문서.txt": No such file or directory
git did not exit cleanly (exit code 127)

TortoiseGit Setting

General -> Git for Windows Git.exe Path : C:\cygwin\bin (Git version 2.8.3)

Advanced CygwinHack true

Help Me~! Thank you


Solution

  • This looks like an incompatibility between the Windows world and the Cygwin world (in the sense of encoding): TortoiseGit calls git.exe in order to update the file. As you described in the comments it also did not work for you from Windows cli.

    I'm no cygwin export, but if you find a way on how to pass a korean encoded filename to git.exe from Windows cli I can try to code this into TortoiseGit.

    PS: I strongly recommend not to use cygwin as cygwin git is known to be broken as it does not even pass the test suite (cf. https://github.com/libgit2/libgit2/pull/3040#issuecomment-94169001) - that's why Cygwin support is just experimental in TortoiseGit. Better use Git for Windows.