[rejected] master -> master (non-fast-forward)

To https://github.com/xxx/xxx.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/xxx/xxx.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决:

git pull origin master --allow-unrelated-histories
git add .
git commit -m '提交说明'
git push origin master

在这里插入图片描述

posted @ 2022-03-04 23:03  涤心  阅读(72)  评论(0)    收藏  举报