diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000000000000000000000000000000000..0260644433c22d17b209f5af171fa043be4a1a0b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,7 @@
+# Declare files that will always have LF line endings on checkout.
+*.sh text eol=lf
+gradlew text eol=lf
+
+# Declare files that will always have CRLF line endings on checkout.
+*.{bat,[bB][aA][tT]} text eol=crlf
+*.{cmd,[cC][mM][dD]} text eol=crlf