diff --git a/.gitignore b/.gitignore
index db0af4ed70489f33581f94a23ede679610e826a8..587392cce19b92e2a69066327dcc54721f73326f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,108 +1,6 @@
-
-# /
-/Makefile
-/Makefile.in
-/config.*
-/configure
-/aclocal.m4
-/dependencies.m4
-/autom4te.cache
-/depcomp
-/install-sh
-/missing
-/mkinstalldirs
-/libtool
-/semantic.cache
-/stamp-h1
-/.deps
-/.libs
-/dune-contact.pc
-/am
-/ltmain.sh
-/compile
-/test-driver
-/1bcontact
-/2bcontact
-/adaptmeasure
-/1badaptmeasure
-/nladaptmeasure
-/nbcontact
-/nonlincontact
-/het2bcontact
-
-# /doc/
-/doc/Makefile.in
-/doc/Makefile
-
-# /doc/doxygen/
-/doc/doxygen/html
-/doc/doxygen/Makefile
-/doc/doxygen/Makefile.in
-/doc/doxygen/semantic.cache
-/doc/doxygen/Doxyfile.in
-/doc/doxygen/Doxyfile
-/doc/doxygen/doxygen-tag
-/doc/doxygen/doxygen.log
-/doc/doxygen/doxyerr.log
-
-# /dune/
-/dune/Makefile.in
-/dune/Makefile
-
-# /dune/contact/
-/dune/contact/Makefile.in
-/dune/contact/Makefile
-
-# /dune/contact/assemblers/
-/dune/contact/assemblers/Makefile
-/dune/contact/assemblers/Makefile.in
-
-# /dune/contact/common/
-/dune/contact/common/Makefile
-/dune/contact/common/Makefile.in
-
-# /dune/contact/common/dual/
-/dune/contact/common/dual/Makefile
-/dune/contact/common/dual/Makefile.in
-/dune/contact/common/dual/.deps
-
-# /dune/contact/common/dual/dualp1/
-/dune/contact/common/dual/dualp1/Makefile
-/dune/contact/common/dual/dualp1/Makefile.in
-
-# /dune/contact/common/dual/dualq1/
-/dune/contact/common/dual/dualq1/Makefile
-/dune/contact/common/dual/dualq1/Makefile.in
-
-# /dune/contact/estimators/
-/dune/contact/estimators/Makefile
-/dune/contact/estimators/Makefile.in
-
-# /dune/contact/projections/
-/dune/contact/projections/Makefile
-/dune/contact/projections/Makefile.in
-
-# /dune/contact/solvers/
-/dune/contact/solvers/Makefile
-/dune/contact/solvers/Makefile.in
-
-# /knee_testsuite/
-/knee_testsuite/tmp
-/knee_testsuite/testSurf1.surf
-/knee_testsuite/testSurf2.surf
-/knee_testsuite/*.eps
-/knee_testsuite/*.svg
-
-# /m4/
-/m4/Makefile.in
-/m4/Makefile
-
-# /src/
-/src/semantic.cache
-
-# /test/
-/test/.deps
-/test/.libs
-/test/Makefile
-/test/Makefile.in
-/test/semantic.cache
+# ignore all build folders
+/build*/
+# ignore backup files
+*~
+# ignore Python files
+*.pyc