Sublime Forum

For a package on package control that lives on github, how to exclude some files in the repo from the package

#1

Right now the entire repo basically becomes the .sublime-package, how to exclude a few of the files/folders from the repo when installing via package control?

2 Likes

#2

When Package Control installs packages from a GitHub repository, it does so by downloading an archive of the repository from GitHub and then changing the name and the internal paths. Github creates those files by using the git archive command and the .gitattributes file is used to exclude files from the archive.

In particular, files marked as export-ignore in the .gitattributes file are not bundled into archives, which also stops them from appearing in packages.

An example of this in use is here; the files and paths mentioned here are present in the OverrideAudit repository but are not included in the package.

I don’t have any experience with BitBucket, but I would imagine that it behaves similarly in this case.

6 Likes

#3

Thank you SO much for the quick reply!! This helps a lot.

0 Likes