ai-coding-mines목차GitHub

커밋 메시지의 큰따옴표가 인자를 쪼갠다

Windows · PowerShell

증상

git commit -m "... "ok:1284"처럼 ..."
error: pathspec '남길' did not match any file(s) known to git

원인

PowerShell이 인자를 네이티브 exe로 넘기기 전에 재파싱한다. 문자열 안의 큰따옴표가 인용을 끊고, 그 자리부터 공백에서 인자가 쪼개진다. 메시지 중간의 단어가 갑자기 pathspec이 된다.

해법

검증

git log -1 --format=%B로 실제 저장된 메시지를 본다.