Add `.gitattributes` file to prevent user from downloading useless files
micalevisk opened this issue · 1 comments
micalevisk commented
Hey!
By now, when we click on GitHub .zip download
hyperlink we download a bunch of files that we won't use in the end. Thus I think it would be nice to remove them when downloading by using the export-ignore
attribute
before (81.1kB) ✖️ | after (1.5kB) ✔️ |
---|---|
![]() |
![]() |
You just need to add the following file in the project's root:
.gitattributes
## Path-based git attributes
## https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
## The following files won't be added to archived files:
/backlinks.txt export-ignore
/LICENSE export-ignore
/.gitattributes export-ignore
/.github export-ignore
/README.md export-ignore
/screenshot.png export-ignore
it's pretty simple so why not? 😄
Inspired by this article by @joaorobertopb
lourot commented
Thanks @micalevisk, good idea, done :)