Warning this permanently deletes all files from an older commit, regardles if they were added, deleted or modified!
Fitrst, list all files with full paths:
git diff-tree --no-commit-id --name-only -r 39f96f9 > files.txt
Then, for each file from files.txt