6月
11
git status 日文文件名乱码

这一长串也不知道是什么,也不敢随便往里面添加。一开始以为是Iterm2的锅,找了好多方法都不行。
后来查了记录,是git config的问题。
git status
の表示で、日本語のファイル名が下記のように文字化けしてしまうことがあります。
1 2 3 4 5 6 7 8 9 |
$ git status On branch master Untracked files: (use "git add <file>..." to include in what will be committed) "\343\201\202\343\201\202\343\201\202.txt" nothing added to commit but untracked files present (use "git add" to track) |
このような場合は、下記のように core.quotepath
設定を false
に設定します。
1 2 |
$ git config --global core.quotepath false |
これで正しく日本語のファイル名が表示されるようになります。
