git push --force失败

时间:2018-10-07 23:55:34

标签: git push bfg-repo-cleaner

我最近对存储库进行了一些清理,因为它的历史记录中包含一些大文件。我使用BFG进行清理,按照此处here的步骤进行了必要的步骤。在执行git push来发布更新的更改的最后步骤中,它失败了。错误消息:

$ git push --force
Enumerating objects: 4767, done.
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'https://my/personal/repo.git'

一些其他信息:

  1. 我在一个不光秃的仓库中进行清理
  2. 我目前在提取存储库方面遇到了麻烦,因为它已经超过2G,因此我想清理一些我不小心将其推送到远程存储库的图像文件。
  3. 还有其他人正在使用该回购协议,我希望以尽量减少对工作的干扰的方式进行清理。
  4. 当前,我们所有人都通过以下命令来获取最新的提交并从那里开始工作:

    git clone -b dev https://my/personal/repo.git --depth=1

1 个答案:

答案 0 :(得分:0)

我的猜测是,这并不特定于您要推送的分支。

fatal: the remote end hung up unexpectedly是连接性或身份验证类型的问题。

您是否有未清理的回购版本?您可以尝试将其推入以确认设置正确。