I used heroku's web page to set up my discord bot app. Every time after I push to my github's master branch, heroku will automatically deploy to heroku. Now I have created another branch called "dev-NoUser" and added a submodule (my other repo) into this repo. I want to deploy this branch to heroku, so I select the branch under the drop down list in name_of_my_app/Deploy/Automatic_deploys. However, heroku didn't clone my submodule. What should I do?
Asked
Active
Viewed 302 times
1 Answers
4
GitHub Sync on Heroku doesn't do an actual git push
. So it doesn't fetch submodules automatically.
You can resolve this with a custom buildpack: https://github.com/dmathieu/heroku-buildpack-submodules
heroku buildpacks:add https://github.com/dmathieu/heroku-buildpack-submodules -i 1

James Ward
- 29,283
- 9
- 49
- 85

Damien MATHIEU
- 31,924
- 13
- 86
- 94
-
Thank you! It works! But heroku ask me to add `-a
` to your command. I'm new to heroku, could you tell me what's that -i 0 meaning? – tamashika Nov 19 '18 at 10:30 -
1Try `heroku help buildpacks:add` ;-) – Damien MATHIEU Nov 19 '18 at 10:37
-
this still does not work for me because on github sync or push to heroku git the .gitmodules file is removed – Nikky Feb 13 '20 at 21:48
-
You probably have another issue, because Heroku doesn't remove the `.gitmodules` file. You should make sure it's properly within your GIT repository. – Damien MATHIEU Feb 14 '20 at 08:27