git - 错误:未能将一些参考推送到 'git@github.com:MyGitHub/foo.git'
问题描述
我更改了 GitHub 中两个文件的目录。现在,无论我尝试什么,Git 都不会将任何更改推送到 GitHub。我得到的错误是:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:MyGitHub/foo.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.
这个解决方案对我不起作用。 这个解决方案对我不起作用。将我的远程存储库重新克隆到我的本地不起作用。即使完全删除 github 中的文件(我已将其保存在其他地方)也不起作用。
如何使此错误消失并恢复再次推送到我的 GitHub 的能力?
解决方案
推荐阅读
- python - 无法在 google colab 中使用“Times New Roman”字体
- python - 尝试在 Python 中加载库
- python - 如何在python中打破signal.pause?
- python-3.x - 在没有 sklearn 的情况下创建 Kfold 交叉验证集
- gradle - 在 Gradle 中定义 bootRun 任务的替代方法不起作用
- javascript - 如何评估二维数组中所有可能的相邻瓦片组?
- javascript - 在没有服务器的情况下加载 JSON 文件
- java - 数据库或 Java 类中的继承?
- flutter - Firebase OnMessage 函数刷新小部件
- datagrid - 如果值为 null,则 WPF DataGrid 单元格 DataTrigger