如何重置 Git LFS 带宽?

How to reset Git LFS bandwidth?

我已经将大小为 876MB 的文件推送到 git lfs,这分别显示了总共 0.9 的可用存储空间和带宽,但是,然后我做了一些更改,例如删除了旧的 repo 并卸载了 git lfs,因为我将图像大小从 900MB 减小到 800MB,然后推回到我新创建的 git 存储库。当我看到 lfs 的账单时,它显示了 0/1GB(将更新为 0.8)的存储空间和 1.7/1GB 的带宽,并且在 Github 禁用了我的 'git lfs' 帐户之后。我实际上想删除带宽存储,即将其重置为以前的状态。有什么解决办法吗?非常感谢任何建议

2021 年 9 月更新,在 radmap 上(尚未交付):

"Git LFS moves to metered billing"

LFS billing will switch from prepaid data packs to metered (pay for what you use).

The free entitlements (for example, 1GB storage and 1GB bandwidth) will be unchanged.

Customers will not be billed for LFS storage that occurred prior to the start of metering.

Intended Outcome

This change brings LFS billing in line with how Packages and Actions bill.
Instead of prepaying for a quota, you'll only be charged for what your repositories use.

How will it work?

We'll calculate how much storage is used and measure how much outbound bandwidth is used.
Each month, you'll be charged per-unit for each of these resources.


原始答案:20219 年 12 月:

"About storage and bandwidth usage" 来自 GitHub 确实提到:

When you download a file tracked with Git LFS, the total file size is counted against the repository owner's bandwidth limit.
Git LFS uploads do not count against the bandwidth limit.

因此您无法删除或重置带宽:它已被您过去的下载占用。

For example:

  • If you push a 500 MB file to Git LFS, you'll use 500 MB of your allotted storage and none of your bandwidth. If you make a 1 byte change and push the file again, you'll use another 500 MB of storage and no bandwidth, bringing your total usage for these two pushes to 1 GB of storage and zero bandwidth.
  • If you download a 500 MB file that's tracked with LFS, you'll use 500 MB of the repository owner's allotted bandwidth. If a collaborator pushes a change to the file and you pull the new version to your local repository, you'll use another 500 MB of bandwidth, bringing the total usage for these two downloads to 1 GB of bandwidth.

加上:

Forking and pulling a repository counts against the parent repository's bandwidth limit.

因此,如果您的存储库被分叉,您甚至无需执行任何操作即可使用带宽。