diff --git a/.gitattributes b/.gitattributes
index 69b2827df914841240ffe0eb38cf8136dacca261..241502952ee4444bd2ce9fd893a9a7ebf7b9f465 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,4 @@
+.gitignore		export-ignore
+.gitattributes		export-ignore
+
 update_version		export-ignore
diff --git a/.gitignore b/.gitignore
index fddf6ddf91409da422bfd023710e7be3ddc922ad..27a956b7ce91a2cf817885158f96a5914750a31f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@ install-sh
 .deps
 .libs
 .dirstamp
+*.a
 *.la
 testcelt
 libtool
@@ -28,7 +29,7 @@ opus_compare
 opus_demo
 repacketizer_demo
 stamp-h1
-*.sw
+*.sw*
 *.o
 *.lo
 *.pc
@@ -37,8 +38,7 @@ tests/*test
 tests/test_opus_api
 tests/test_opus_decode
 tests/test_opus_encode
-celt.pc
-celt.spec
+tests/test_opus_padding
 celt/dump_modes/dump_modes
 celt/tests/test_unit_cwrs32
 celt/tests/test_unit_dft
@@ -48,6 +48,10 @@ celt/tests/test_unit_mathops
 celt/tests/test_unit_mdct
 celt/tests/test_unit_rotation
 celt/tests/test_unit_types
+doc/doxygen-build.stamp
+doc/html
+doc/latex
+doc/man
 *.vcxproj.user
 opus.sdf
 opus.suo