How do I use octal characters in a git checkout? How do I use octal characters in a git checkout? shell shell

How do I use octal characters in a git checkout?


You can try using printf, which understands 3-character octal escapes, e.g.:

git checkout -- "$(printf "Steve_Erquiaga-Cafe_Paradiso/05 - After_a_Dream__Faure___Apr\303\203\302\250s_Une_R\303\203\302\252ve_.flac")"

I haven't tested this, I'm afraid, but I think it should work.


Try using double quotes instead of single quotes in your git checkout command. Escape sequences generally work inside double-quoted strings but not single quoted.

And here's an even easier idea, but it could erase local changes:

git checkout .