To https://gitee.com/baiboystu/spring-mvc-test.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://gitee.com/baiboystu/spring-mvc-test.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.
时间: 2024-03-30 21:38:26 浏览: 95
git push rejected
这个错误提示说明你想要将本地的master分支推送到远程仓库的master分支,但是远程仓库的master分支已经包含了你本地分支没有的提交,因此推送被拒绝了。为了解决这个问题,你需要先将远程仓库的更新拉取到本地,合并更新后再次尝试推送,具体操作如下:
1. 切换到本地的master分支:`git checkout master`
2. 拉取远程仓库的更新: `git pull origin master`
3. 如果有冲突,需要解决冲突并进行提交
4. 再次尝试推送到远程仓库:`git push origin master`
阅读全文