Hands-on task
Exclude a directory from git archive
In /root/repo there is a file build.txt and a directory secret/ with a file secret/keys.txt.
Make it so the secret/ directory doesn't get into the archive created via git archive, while build.txt stays in the archive and secret/ itself is not removed from the repository. To do this, add a .gitattributes file to the repository with the export-ignore attribute for secret/ and commit it (the archive reads attributes from the specified revision, so the changes must be in a commit).
- git archive
- gitattributes
- export-ignore
- release export