I noticed I always google the same procedures…

Remove a file from a commit

Direct remove without editing anything:

git reset HEAD^ -- path/to/file
git commit --amend --no-edit

Step-by-step:

git reset --soft HEAD~1
git reset HEAD path/to/unwanted_file
git commit -c ORIG_HEAD

Source