Folder from the GIT remove PHPStorm .idea but locally restricted

If one accidentally with has taken over the .idea folder in its GIT versioning, is it unfortunately not possible via the IDE-PHPStorm, to remove this again.

You can run a command but just through the console, removed the folder from the GIT and locally further retains (No delete the painstakingly decorated settings!).

git rm --cached -r -f  .idea/

After that, the folder should be entered in the .gitignore: