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

前端 未结 17 1436
梦如初夏
梦如初夏 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 05:18

    I had this error and it was because there was an update on the server but SourceTree was not showing any updates available (possibly because I was offline when it last checked). So I did a refresh in source tree and now it shows 2 items to push instead of 1 item.

    So be sure to press refresh or pull if you get this error and then try again.

提交回复
热议问题