git push heroku master says “Everything up-to-date”, but the app is not current

前端 未结 13 1372
孤独总比滥情好
孤独总比滥情好 2020-12-02 09:00

I have an app on Heroku that is running old code. I\'ve made a small change and committed the change. I then ran

git push heroku master

I

相关标签:
13条回答
  • 2020-12-02 09:00

    Same issue, I added a remote to my local repository with the heroku git:remote command and then pushed it.

    heroku git:remote -a your-heroku-app
    
    git push heroku master
    
    0 讨论(0)
  • 2020-12-02 09:01

    Even though this is an old issue, I wanted to update with what worked for me (a newbie) should anyone else run into this:

    After following the instructions here (from Hudson), what finally did the trick for me was doing a "git pull" after checking out the "master" branch. Perhaps "git push heroku master" pushes out only the local branch of master?

    Of course, this assumes all required changes have been correctly merged into your master. I hadn't pulled from master on my local since the project set up because all merges (from development to master) were handled on GitHub and I had been working on new branches that were later merged with development.

    So, to restate steps above from Hudson:

    git checkout master

    git pull

    (here, I updated README to have a change to commit, like "Heroku deploy [date, time]"

    git add .

    git commit -am "xxxyyzzz"

    git push heroku master

    heroku run rake db:migrate

    heroku restart

    Good luck!

    0 讨论(0)
  • 2020-12-02 09:03

    Had the same issue multiple times. What worked for me if clearing my browser history or opening the app in an incognito window.

    0 讨论(0)
  • 2020-12-02 09:04

    had the same issue, what worked for me was: make a commit with a random message and then push

    git commit -m"random message"
    
    git push heroku master
    
    0 讨论(0)
  • 2020-12-02 09:06

    When this happens, I push previous commit hash to master like this:

    git push some-heroku-app-name SOME-COMMIT-HASH:master --force
    

    Then I re-push master like this:

    git push some-heroku-app-name master:master
    
    0 讨论(0)
  • 2020-12-02 09:08

    I know, I know, silly, but it happened to me so I'm leaving a warning to others: make sure the app you're pushing to is the same app you're checking for changes.

    In my case I was pushing to staging and then running a shell on production and not understanding why the static files didn't change.

    (It started with a real issue where static files didn't change when I pushed a new version, but it was probably a one-push fluke, and it only kept me going in circles for another hour because I was testing the wrong app.)

    0 讨论(0)
提交回复
热议问题