failed to push some refs to git@heroku.com

后端 未结 27 2188
野性不改
野性不改 2020-12-02 10:10

I am getting this error when I am trying push my files into heroku rep.

Ive set autocrlf = false already in gitconfig but this problem is still there. i have also tr

相关标签:
27条回答
  • 2020-12-02 10:17

    Also, make sure your branch is clean and there is nothing unstaged you can check with git status stash or commit the changes then run the comand

    0 讨论(0)
  • 2020-12-02 10:19

    There is one more subtle reason why this might happen. If you added some new packages to your app or updated existing packages, remember to update your requirements.txt file as well.

    pip freeze > requirements.txt
    

    Then you can continue with the usual process for pushing your repository

    git add .
    git commit -m "Some changes"
    git push heroku master
    
    0 讨论(0)
  • 2020-12-02 10:20

    In Heroku,you may have problems with pushing to master branch. I just had to start a new branch using

    git checkout -b masterbranch
    

    and then push using

    git push heroku masterbranch
    

    please try as above!

    0 讨论(0)
  • 2020-12-02 10:22

    Execute this:

    $ rake assets:precompile
    $ git add .
    $ git commit -m "Add precompiled assets for Heroku"
    $ git push heroku master
    

    Source: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

    0 讨论(0)
  • 2020-12-02 10:22

    I'm the only person working on my app and only work on it from my desktop, so the possibility that I managed to get the heroku repository above dev didn't make sense. BUT! I recently had a Heroku support rep look into my heroku account for a cache issue involving gem installs and he had changed something that caused heroku to return the same error as the one listed above. A git pull heroku master was all it took. Then I found the reps minor change and reverted it myself.

    0 讨论(0)
  • 2020-12-02 10:22

    I followed the following steps and it worked for me.

    • Please take a copy of your (local) changes. fetch heroku reset --hard heroku/master Then try to 'git push heroku'.
    0 讨论(0)
提交回复
热议问题