Getting an error pushing to github - Updates were rejected because a pushed branch tip is behind its remote

前端 未结 3 1790
既然无缘
既然无缘 2020-12-01 14:44

I am having a problem pushing to a different heroku remote.

To check myself I renamed my entire project directory to _backup and then:

git clone acco         


        
3条回答
  •  感动是毒
    2020-12-01 15:24

    I am always a big fan of using git pull --rebase and then git push origin master . A couple of the places I have worked since a lot of places do not allow a push -f (especially places that use bitbucket).

    git pull --rebase 
    git push origin master
    

    The rebase will apply your changes after those already to the remote (online website). This video literally goes over your exact issue and solves it using git pull --rebase https://youtu.be/IhkvMPE9Jxs?t=10m36s

提交回复
热议问题