.gitignoreに書いた.idea/workspace.xmlなどが消えない

http://stackoverflow.com/questions/19973506/cannot-ignore-idea-workspace-xml-keeps-popping-up

.gitignore

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Gradle:
.idea/gradle.xml
.idea/libraries

# Mongo Explorer plugin:
.idea/mongoSettings.xml

一度.ideaフォルダを退避して空ディレクトリをコミットして元にもどす

mv .idea ../.idea_backup
rm .idea # in case you forgot to close your IDE
git add .idea 
git commit -m "Remove .idea from repo"
mv ../.idea_backup .idea