Push to origin/master was rejected

简介: 这篇文章提供了解决在IDEA中遇到"Push to origin/master was rejected"错误的步骤,包括执行特定的git pull命令并使用`--allow-unrelated-histories`选项来合并不相关的仓库历史。

在IDEA中、按ALT+F12

输入以下的命令

  • git pull
  • git pull origin master
  • git pull origin master --allow-unrelated-histories

然后再次提交

相关文章
|
开发工具 git
git push报错:The current branch master has no upstream branch
git push报错:The current branch master has no upstream branch
36708 0
git push报错:The current branch master has no upstream branch
|
5月前
|
Ruby
GitLab: Push operation timed out
本文描述了在推送AOSP源码到GitLab时遇到的超时问题,并提供了通过在GitLab服务器上禁用LFS检查功能来解决这个问题的方法。
97 1
|
开发工具 git
git报错error: failed to push some refs to ‘https://gitee.com/XXX/XXX-mater.git‘
git报错error: failed to push some refs to ‘https://gitee.com/XXX/XXX-mater.git‘
git报错error: failed to push some refs to ‘https://gitee.com/XXX/XXX-mater.git‘
|
8月前
|
网络安全 开发工具 git
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
96 0
|
开发工具 git
解决Git push提交时Permission denied(publickey).Could not read from remote...的问题
解决Git push提交时Permission denied(publickey).Could not read from remote...的问题
425 0
|
8月前
|
开发工具 git
Git:error: remote origin already exists
Git:error: remote origin already exists
165 2
|
运维 Shell 开发工具
【Git异常】Push master to origin/master was rejected by remote
【Git异常】Push master to origin/master was rejected by remote
347 0
|
Shell BI 开发工具
【问题解决】Git报错:failed to push some refs to xxxxx
Git报错:failed to push some refs to xxxxx
581 0
|
开发工具 git
使用git提交到远程仓库报错:Updates were rejected because the remote contains work that you do
使用git提交到远程仓库报错:Updates were rejected because the remote contains work that you do
2934 0
使用git提交到远程仓库报错:Updates were rejected because the remote contains work that you do
|
Shell 开发工具 git
Idea 提交 Push rejected: Push to origin/master was rejected
idea中,发布项目到码云上,当时按照这样的流程添加Git,然后push,提示:push to origin/master war rejected"。
225 0