我最近对我的仓库进行了一些清理,因为它在历史记录中有一些大文件。我曾使用 BFG 进行清理,并按照此处所述执行了必要的步骤。在执行 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'
一些附加信息:
- 我在一个非裸仓库中进行了清理
- 我目前在拉取 repo 时遇到了麻烦,因为它已经超过 2G,因此想要清理一些我不小心推送到远程 repo 的图像文件。
- 还有其他几个人在使用这个 repo,我想以一种尽量减少对他们工作的干扰的方式进行清理。
目前,我们所有人都在通过以下命令提取最新的提交并从那里开始工作:
git clone -b dev https://my/personal/repo.git --depth=1