git rm -r –cached .idea

This removes .idea from Git index only, not your disk. (–cached = keep local, untrack in repo.)