diff --git a/.gitattributes b/.gitattributes
index ef775b91288dbb8043d94d61f54796491938489e..d45620912eebdefd549c4d30d9da82cb22cabc3e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -13,22 +13,6 @@
 *.manifest -crlf -whitespace
 # Patches
 /tools/SDL-1.2.14-gc/SDL-1.2.14-gc.patch -whitespace
-# LibPNG
-/libs/libpng-src/CMakeLists.txt -whitespace
-/libs/libpng-src/libpng-1.2.*.txt -whitespace
-/libs/libpng-src/libpng.3 -whitespace
-/libs/libpng-src/*.c -whitespace
-# Zlib
-/libs/zlib/contrib/amd64/amd64-match.S -whitespace
-/libs/zlib/contrib/delphi/zlibd32.mak -crlf -whitespace
-/libs/zlib/contrib/gcc_gvmat64/gvmat64.S -whitespace
-/libs/zlib/contrib/minizip/MiniZip64_Changes.txt -whitespace
-/libs/zlib/contrib/minizip/MiniZip64_info.txt -whitespace
-/libs/zlib/contrib/pascal/zlibd32.mak -whitespace
-/libs/zlib/nintendods/Makefile -whitespace
-/libs/zlib/nintendods/README -whitespace
-/libs/zlib/watcom/watcom_f.mak -crlf -whitespace
-/libs/zlib/watcom/watcom_l.mak -crlf -whitespace
 #Appveyor
 /appveyor.yml -crlf -whitespace
 # Other
diff --git a/libs/.gitattributes b/libs/.gitattributes
new file mode 100644
index 0000000000000000000000000000000000000000..3e5f13055e38e7b3ff570d6202c68802d97990cd
--- /dev/null
+++ b/libs/.gitattributes
@@ -0,0 +1,8 @@
+#All
+* -whitespace
+# Zlib
+/zlib/watcom/watcom_f.mak -crlf
+/zlib/watcom/watcom_l.mak -crlf
+#SDL2
+/SDL2/docs/README-porting.md conflict-marker-size=32
+# Other