How to reset Heroku app and re-commit everything?

前端 未结 9 2083
傲寒
傲寒 2020-12-07 09:57

I\'m building an application which I\'m also testing in Heroku. I ran into some problem today and had to rollback one commit in my local git repo, but Heroku now won\'t reco

相关标签:
9条回答
  • 2020-12-07 10:48

    I had same problem and solved it by

    Git push origin HEAD:master

    For you

    Git push heroku HEAD:master

    0 讨论(0)
  • 2020-12-07 10:54

    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

    0 讨论(0)
  • 2020-12-07 10:56

    I had the same problem and I tried all the suggestions and didnot help. I had to run assets precompile locally and push, even though I did heroku run rake assets:precompile.

    rake assets:precompile
    git add .
    git commit -am "local assets precompile"
    git push heroku master
    
    0 讨论(0)
提交回复
热议问题