$ git push origin master To gitee.com:lpiueng/pic-go.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'gitee.com:lpiueng/pic-go.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.
时间: 2023-12-06 20:39:30 浏览: 259
解决Unable to access 'https://gitee.com/自己的项目/': Could not resolve host: gitee.com问题
这个错误提示是因为你当前的分支不是最新的,需要先将远程仓库的最新代码拉取到本地仓库,然后再进行推送。你可以使用以下命令:
```
git pull origin master
```
这会将远程仓库的最新代码合并到本地仓库的当前分支上。然后再执行推送命令:
```
git push origin master
```
这次推送应该就可以成功了。
阅读全文