私は US-English OS X 10.6.4 を使用しており、名前にアジア文字を含むファイルを Git リポジトリに保存しようとしています。
では、Git 作業ツリーにそのようなファイルを作成しましょう。
$ touch どうもありがとうミスターロボット.txt
Git は、8 進数でエスケープされた UTF-8 形式として表示しています。
$ git version
git version 1.7.3.1
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# "\343\201\250\343\202\231\343\201\206\343\202\202\343\201\202\343\202\212\343\201\213\343\202\231\343\201\250\343\201\206\343\203\237\343\202\271\343\202\277\343\203\274\343\203\255\343\203\233\343\202\231\343\203\203\343\203\210.txt"
nothing added to commit but untracked files present (use "git add" to track)
残念ながら、Git リポジトリに追加できません。
$ git add どうもありがとうミスターロボット.txt
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# "\343\201\250\343\202\231\343\201\206\343\202\202\343\201\202\343\202\212\343\201\213\343\202\231\343\201\250\343\201\206\343\203\237\343\202\271\343\202\277\343\203\274\343\203\255\343\203\233\343\202\231\343\203\203\343\203\210.txt"
nothing added to commit but untracked files present (use "git add" to track)
Git は単にこのファイルを無視しました。
ワイルドカードの使用は次のように機能します。
$ git add *.txt
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: "\343\201\250\343\202\231\343\201\206\343\202\202\343\201\202\343\202\212\343\201\213\343\202\231\343\201\250\343\201\206\343\203\237\343\202\271\343\202\277\343\203\274\343\203\255\343\203\233\343\202\231\343\203\203\343\203\210.txt"
#
しかし、特定のファイル名のアプリケーションから Git コマンドを呼び出したいと考えています。このファイルに正確に一致するワイルドカード パターンを発明するオプションはありませんが、他にはありません。
これは Git の既知のバグですか、それとも私が Git を正しく使用していないのでしょうか?