Move directory in .gitignore (#1787)

diff --git a/.gitignore b/.gitignore
index de4c573..03c8268 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
 # Two-trick pony for OSX and other case insensitive file systems:
 # Ignore ./python binary on Unix but still look into ./Python/ directory.
-.idea/
 /python
 !/Python/
 *.cover
@@ -76,6 +75,7 @@
 core
 db_home
 .hg/
+.idea/
 ipch/
 libpython*.a
 libpython*.so*