$ git push To ssh://10.63.1.35:9222/cloud/mapping.git ! [rejected] develop -> develop (fetch first) error: failed to push some refs to 'ssh://10.63.1.35:9222/cloud/mapping.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
时间: 2024-03-09 19:50:03 浏览: 63
这是一个 Git 的错误提示,意思是你在 push 代码到远程仓库时出现了问题。错误提示中提到远程仓库已经包含了你没有的一些工作内容,这通常是因为其他人已经在推送到同一个分支上了。解决这个问题的方法是先将远程仓库的内容拉取到本地仓库中,然后再将你的代码推送到远程仓库。你可以执行以下命令来解决这个问题:
```
git pull origin develop
```
这会将远程仓库中的代码更新到本地的 develop 分支上。如果有冲突需要手动解决冲突。然后再执行 push 命令将代码推送到远程仓库:
```
git push origin develop
```
这样就能够成功将代码推送到远程仓库了。
阅读全文