johannesch
johannesch

Reputation: 135

Can Heroku ignore git submodules on deploy?

We have a git repo with a submodule which contains some binary test data. We don't need it to run the app and it is huge in size and slows down the deploy considerably. But heroku tries to clone including the submodule, even though the submodule is in a directory that is in .slugignore. Is there a way to prevent Heroku from checking out the submodule?

Upvotes: 4

Views: 752

Answers (1)

D.M.
D.M.

Reputation: 185

Heroku first checkout your branch before looking at the .slugignore: https://devcenter.heroku.com/articles/slug-compiler#compilation

One thing you can do is create a new branch without your .submodule files and send it to heroku. The downside is you have to keep it in sync with your main branch.

Upvotes: 1

Related Questions