Heroku Git Repository Size

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?

  • How to overcome going futher down in git Bash
  • How is “author” determined for a git commit when rebasing and squashing?
  • Pushing local repo to bare server repo on shared host
  • How do I get the latest commit of public git repo in my gemfile?
  • Import repository from git to gerrit
  • 'git add .' doesn't work
  • Cannot commit changes with intellij
  • Is there a nodegit equivalent to `$ git add -N *` and `$ git diff --name-only`?
  • git java wrapper - git pull never ends
  • Migrate to GIT from TFS with multiple branches and their history
  • Github projects with databases
  • Trigger a TeamCity build on changes in a git submodule
  • 2 Solutions collect form web for “Heroku Git Repository Size”

    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 with git 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.

    Use gitignore for stuff you don’t actually use and ensure all images etc are on s3, keep your slug small as small as pos is the first issue.
    Heroku will restart you app on upload so you can’t avoid the downtime issue (would love to be corrected on the downtime thing), been a while since I used heroku.

    Git Baby is a git and github fan, let's start git clone.