Skip to content

Comments

Add .gitattributes file#48

Merged
schlessera merged 2 commits intomainfrom
fix/prune-dist-archive
Dec 11, 2020
Merged

Add .gitattributes file#48
schlessera merged 2 commits intomainfrom
fix/prune-dist-archive

Conversation

@schlessera
Copy link
Collaborator

@schlessera schlessera commented Dec 10, 2020

The .gitattributes file being added by the following PR provides these features:

  • Uses PHP-specific diff algorithm for PHP files
  • Mark files in resources and in tests/spec as being generated (so they are hidden by default in diffs)
  • Exclude these files/folders from dist archives:
    • .github/
    • bin/
    • tests/
    • .editorconfig
    • .gitattributes
    • .gitignore
    • .phpcs.xml.dist
    • phpstan.neon.dist
    • phpunit.xml

Fixes #47

@schlessera schlessera added this to the 0.1.1 milestone Dec 10, 2020
@@ -0,0 +1,17 @@
# Improve diff output for PHP files.
*.php diff=php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL! Oh wow, we need this on amp-wp.

Where is this documented?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the endless deluge of tips and tricks ever end?

@schlessera schlessera merged commit 1c740c7 into main Dec 11, 2020
@schlessera schlessera deleted the fix/prune-dist-archive branch December 11, 2020 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prune unneeded files from dist archives

3 participants