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

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

    git pull --rebase origin master

    git push origin master


    git push -f origin master

    Warning git push -f origin master

    • forcefully pushes on existing repository and also delete previous repositories so if you don`t need previous versions than this might be helpful

提交回复
热议问题