During late development of an application I’ve been git pushing to heroku such that the repository there is fairly large.
I would like at this stage, before site launch, to remove all old versions from the repo as it seems sensible housekeeping. What would be the best way to go about this so my online application be uninterrupted?
There is really no need to do this for Heroku specifically, as when you push, it compiles your app into a slug for quick deployment, and one step of that is dropping the git repo entirely.
But if you really want to do this, I’d suggest just deleting the
.git/directory from your project and starting a new repo withgit init.Heroku acts just like any other git remote you can push to, so anything you can do to a normal git remote, you can do to your Heroku git remote. So if you push a new, empty repo to it, that should solve your problem for sure.