Git revert last commit in heroku
If you've reverted the commit locally you may need to git push
with a -f
option to force the commit in.
Also, you may want to have a look at Heroku releases which may help too.
From http://devcenter.heroku.com/articles/releases#rollback
Use the rollback command to roll back to the last release:
$ heroku rollback
Rolled back to v51
You may choose to specify another release to target:
$ heroku rollback v40
Rolled back to v40
Given that you have already pushed to other (public?) repositories, the best way to fix this is probably to undo the git reset
locally, then do a git revert
to create a new commit that reverses the effects of the bad commit. Then push everything again. So step by step:
So first
git reset --hard origin/master
orgit reset --hard heroku/master
(or whatever your heroku tracking branch is called), in order to get your localmaster
back the bad commit. This will blow away any outstanding changes in your working copy, so be careful.Then
git revert HEAD
to create a new commit (it will prompt you for a commit message).Then push as you usually would.