git: updates were rejected because the remote contains work that you do not have locally

前端 未结 17 1277
梦如初夏
梦如初夏 2020-11-22 04:54

I\'m working on a team with a few developers using git on BitBucket. We are all working on a dev branch, not pushing to master until a release.

17条回答
  •  悲哀的现实
    2020-11-22 04:57

    You can override any checks that git does by using "force push". Use this command in terminal

    git push -f origin master

    However, you will potentially ignore the existing work that is in remote - you are effectively rewriting the remote's history to be exactly like your local copy.

提交回复
热议问题