diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000000000000000000000000000000000..7121c312701c93309efa3b911a8dba412ae51681
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,12 @@
+# Path-based git attributes
+# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
+
+# Ignore all test and documentation with "export-ignore".
+/.editorconfig               export-ignore
+/.gitattributes              export-ignore
+/.gitignore                  export-ignore
+/.gitlab-ci.yml              export-ignore
+/phpcs.xml.dist              export-ignore
+/phpunit-unit.xml            export-ignore
+/phpunit-integration.xml     export-ignore
+/tests                       export-ignore