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

前端 未结 17 1196
梦如初夏
梦如初夏 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:56

    This is how I solved this issue:

    1. git pull origin master
    2. git push origin master

    This usually happens when your remote branch is not updated. And after this if you get an error like "Please enter a commit message" Refer to this ( For me xiaohu Wang answer worked :) )

提交回复
热议问题