How to reset Heroku app and re-commit everything?

Sounds weird. Maybe try pushing a different branch would do?

git branch production
git checkout production
#do some code changes
git commit -am "some desperate code changes to try fix heroku"
git push heroku production:master

Creating a new production branch is what I want you to test. Besides, it's nice to have a production branch that you can use to deploy.

If it doesn't work, then I think the problem runs deeper and you need help from heroku.

EDIT: Add the heroku releases addon too. Rolling back is as easy as heroku rollback


This doesn't work in all situations, but if your local repo has diverged from the Heroku repo such that git can't figure out how to reconcile the two -- like if you rebased your local branch after it was pushed to Heroku -- you can force a push by putting a plus sign + before the ref, like this:

git push heroku +master

It may not work in your case, but it's worth a try.


This worked for me (from https://coderwall.com/p/okrlzg):

  1. Run heroku plugins:install https://github.com/lstoll/heroku-repo.git
  2. heroku repo:reset -a APPNAME

From there, the git repository has been "reset". Next, run:

  1. git push heroku master -a APPNAME

to seed the git repository and re-deploy your app.


Supposing you rolled back one commit you remotely did, that previously existed. I think you should make:

git merge heroku/master

If you just want to go forward

or:

git push --force heroku master

if you want to push that change


I once had a similar problem and solved it by changing one char in my code and running git add/commit/push again. I imagine you've already tried that though.

Don't break the app, just add a comment to a CSS file or something and see if that does the trick

good luck