Bitbucket使用BFG减少回购规模 [英] Bitbucket reduce repo size with BFG

查看:79
本文介绍了Bitbucket使用BFG减少回购规模的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于一些静态资产(视频,图像),我的团队在Bitbucket上的回购邮件为1.34GB

My team's repo on Bitbucket was 1.34GB due to some static assets (videos, images)

我已经按照 BFG回购清洁器

我的存储库现在为2.37GB,超出了我们的2GB配额,并且现在是只读的.

and my repo is now 2.37GB which is over our 2GB quota and it is now read only.

我运行的命令几乎与BFG主页上的命令相同,

The commands I've run were pretty much what's on the BFG Homepage,

  1. git clone --mirror git://example.com/some-big-repo.git
  2. java -jar bfg-1.13.0.jar --strip-blobs-big-than 100M some-big-repo.git
  3. cd some-big-repo.git
  4. git reflog expire --expire = now --all&&git gc --prune = now --aggressive
  5. git push

运行此命令后,我的存储库增加到2.37GB标记.但是,如果我运行 git count-objects -v ,我的size-pack现在是: size-pack:1073518 与以前相反,它是 size-pack:1213524.因此,从理论上讲,我的仓库较小.

After I run this commands my repo grew to the 2.37GB mark. However if I run git count-objects -v my size-pack is now: size-pack: 1073518 as opposite as before it was size-pack: 1213524. So in theory my repo is smaller.

我不知道,因为它托管在Bitbucket云中,如果我需要它们在服务器上运行或不运行任何东西,某些地方(gitlab,github)似乎需要"them"来运行 git gc 在服务器上.

I dont know because this is hosted in Bitbucket cloud If I need them to run anything on the server or not, some places (gitlab, github) seem to need "them" to run git gc on the server.

这是必要的吗?无论如何,我可以使用该 git push 撤消所有更改吗?我有 some-big-repo.git.bfg-report 报告,其中包含所有更改,但是我不知道如何使用该报告来还原我的更改.

Is this necessary? Is there anyway I can undo all my changes with that git push? I have the some-big-repo.git.bfg-report report with all the changes, but I dont know how to use that report to revert my changes.

推荐答案

请注意,有关垃圾收集无效数据 的Bitbucket文档说:

Note that Bitbucket docs on Garbage collecting dead data say:

在您进行更改后,请与支持部门联系以在您的服务器上运行git gc.这是git垃圾收集,它在存储库上运行整理任务以反映大小的变化.

After you push your changes, contact Support to run a git gc on the server for you. This is git garbage collection which runs housekeeping tasks on the repository to reflect the change in the size.

...您是否已要求他们运行'git gc'?

... have you asked them to run 'git gc' yet?

这篇关于Bitbucket使用BFG减少回购规模的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆