【已解决】error: failed to push some refs to ‘git@github.com:BATdalao/Github-green.git‘

简介: 【已解决】error: failed to push some refs to ‘git@github.com:BATdalao/Github-green.git‘

报错及效果图

报错代码

$ git push

To github.com:xxx/xxx.git ! [rejected]

main -> main (fetch first) error: failed to push some refs to

‘git@github.com:xxx/xxx.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.

最终效果图

解决方案

git pull
git add .
git commit -m 'hhh'
git push

相关文章
|
8天前
|
Shell 测试技术 网络安全
【GIT】如何在GitHub上向一个开源项目贡献代码?
【GIT】如何在GitHub上向一个开源项目贡献代码?
23 5
|
12天前
|
开发工具 git
git error 已解决【Another git process seems to be running in this repository, e.g. an editor opened by】
git error 已解决【Another git process seems to be running in this repository, e.g. an editor opened by】
20 2
|
12天前
|
存储 开发工具 git
蓝易云 - git中,add到暂存区,commit且push之后,暂存区域里还有内容吗
所以,当你执行 `git add`,然后是 `git commit`,最后是 `git push`之后,暂存区是空的,除非你又执行了新的 `git add`命令来添加更多的更改。
16 1
|
15天前
|
开发工具 git
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
|
1天前
|
Linux 开发工具 git
解决 Linux git push 贡献者不同(没有出现绿点)的问题
解决 Linux git push 贡献者不同(没有出现绿点)的问题
|
8天前
|
安全 网络安全 开发工具
【GIT】GitHub添加ssh密钥
【GIT】GitHub添加ssh密钥
18 0
|
开发工具 git
git push报错:The current branch master has no upstream branch
git push报错:The current branch master has no upstream branch
31909 0
git push报错:The current branch master has no upstream branch
|
项目管理 开发工具 git
git push 报错 pre-receive hook declined
git push 报错 pre-receive hook declined
3363 0
git push 报错 pre-receive hook declined
|
1月前
|
开发工具 git
完美解决git 执行git push origin master指令 报错command not found
完美解决git 执行git push origin master指令 报错command not found
41 0
|
11月前
|
存储 开发工具 git
使用 git push 上传超过100MB文件报错 remote: error: this exceeds GitHub‘s file size limit of 100.00 MB
Git 大文件存储(LFS)用 Git 中的文本指针替换音频示例、视频、数据集和图形等大文件,同时将文件内容存储在 GitHub.com 或 GitHub Enterprise 等远程服务器上。
238 0