Git

Git・開発ツール

git init した直後の git add で「warning: in the working copy of ‘…’, LF will be replaced by CRLF」が全ファイルに出る。原因は Git for Windows の gitconfig の core.autocrlf=true

Windows で既存のフォルダを git init して git add すると、全ファイルに LF will be replaced by CRLF の警告が出る。設定の出どころを --show-origin で調べ、リポジトリだけ core.autocrlf を false にして登録し直した手順です。
Git・開発ツール

git add が「fatal: pathspec ‘…?’ did not match any files」で全部失敗する。while read で読んだ一覧の行末 \r が原因(Git Bash)

Git Bash でファイル一覧を while read で1行ずつ git add すると、存在するファイルなのに pathspec did not match で失敗する。一覧の行末に残った \r(CRLF)が原因で、${f%$’\r’} で取り除けば通ります。
Git・開発ツール

git status で日本語のファイル名が “\344\270\212…” と8進数になり grep できない → git -c core.quotepath=false で読める名前に

git status --porcelain で日本語のファイル名が \344\270… の8進数と引用符つきで出て、日本語で grep して git add する処理が組めない。core.quotepath=false を付けて、名前のまま絞り込んで1ファイルずつ追加した手順です。