Add a --flavour option to the create command which then either creates a .gitattributes file with classic or negated export-ignore directives.
Example of a .gitattributes file with negated export-ignore directives:
# Line-ending normalization for text files.
* text=auto
# PHP-aware hunk headers in `git diff`.
*.php diff=php
# Binary files keep their bytes.
*.gpg binary
*.phar binary
# Default: nothing is included in the dist archive of the Composer package.
# Re-include only the files that actually belong to the distributed package below.
* export-ignore
# Top-level metadata.
composer.json -export-ignore
LICENSE.md -export-ignore
# Source code and CLI entry point.
/src -export-ignore
/bin -export-ignore
Add a
--flavouroption to thecreatecommand which then either creates a.gitattributesfile with classic or negated export-ignore directives.Example of a
.gitattributesfile with negated export-ignore directives: