Deploying to heroku with git keeps getting rejected due to fast-forwards

前端 未结 3 1801
时光说笑
时光说笑 2021-02-02 09:00

I keep getting the following fail with heroku + git...

$ heroku jammit:deploy --app XXXXXXXXXXX
===== Compiling assets...[OK]
===== Commiting assets...[OK]
=====         


        
3条回答
  •  粉色の甜心
    2021-02-02 09:46

    The problem is that changes have already been pushed and your commit is behind those newer pushes. I'm going to assume you have a master branch and your feature branch still, let's say it's called my_feature. You can do this and be okay:

    git checkout master
    git pull
    git checkout my_feature
    git rebase master
        (you may have to fix some conflicts here, if any are found)
    git checkout master
    git merge my_feature
    git push heroku
    

    You should remember to run any tests you have to make sure everything's good still.

提交回复
热议问题