From 4d0ad12882696dc715f8c28b88dfb803c3196a70 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Mon, 25 Nov 2024 10:35:32 +0100 Subject: [PATCH 1/2] Add .gitattributes file with export ignore rules --- .gitattributes | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..724203d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +bin export-ignore +stubs export-ignore +tests export-ignore +.gitattributes export-ignore +.gitignore export-ignore +composer.lock export-ignore +phpcs.xml.dist export-ignore +phpunit.xml.dist export-ignore +psalm.xml.dist export-ignore From c0210beb4e2d657c5697cb86eeffa9faf221bf1e Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Thu, 28 Nov 2024 11:39:34 +0100 Subject: [PATCH 2/2] Extend .gitattributes Co-authored-by: Gary Jones --- .gitattributes | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.gitattributes b/.gitattributes index 724203d..ccf3de3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,9 +1,25 @@ -bin export-ignore -stubs export-ignore -tests export-ignore -.gitattributes export-ignore -.gitignore export-ignore -composer.lock export-ignore -phpcs.xml.dist export-ignore +# Exclude these files from release archives. +# This will also make them unavailable when using Composer with `--prefer-dist`. +# If you develop this package using Composer, use `--prefer-source`. +# https://blog.madewithlove.be/post/gitattributes/ + +bin export-ignore +stubs export-ignore +tests export-ignore +.gitattributes export-ignore +.gitignore export-ignore +composer.lock export-ignore +phpcs.xml.dist export-ignore phpunit.xml.dist export-ignore -psalm.xml.dist export-ignore +psalm.xml.dist export-ignore + +# Auto detect text files and perform LF normalization +# https://pablorsk.medium.com/be-a-git-ninja-the-gitattributes-file-e58c07c9e915 + +* text=auto + +# The above will handle all files NOT found below + +*.md text +*.php text +*.inc text