git remove single file from local commit code example
Example: git remove file from commit
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD