如何从存储库中删除 git lfs

问题描述 投票:0回答:1

我收到来自

git lfs
的警告,称我超出了存储限制。搜索如何从
git lfs
删除文件我来到了这个网站 https://docs.github.com/en/repositories/working-with-files/managing-large-files/removing-files-from-git-large -file-storage,推荐使用
$ git lfs uninstall

我在我的机器上本地运行

$ git lfs uninstall
以及
git lfs untrack
。我更改了
.gitattributes
文件并评论了与
git lfs
相关的所有内容。然后,我
git add -A
并尝试将对代码所做的更改推送到 GitHub 上的远程存储库。然而,这给了我

batch response: This repository is over its data quota. Account responsible for LFS    bandwidth should purchase more data packs to restore access.
Uploading LFS objects:   0% (0/2), 0 B | 0 B/s, done.

错误:无法将一些参考推送到“https://github.com/....git”

如何从我的存储库中删除

git lfs
,而不是它跟踪的文件?我真的不再需要它,所以不需要跟踪文件。不过,我需要保留这些文件!

github git-lfs
1个回答
0
投票

此答案中所述,当前无法从 GitHub 中的远程存储中删除 Git LFS 对象。 文档提出了两件事:

  1. 删除并重新创建存储库。

  2. 或者,如果这是不可能的(⚠️“任何相关问题、星星和分叉也将被删除”),您必须联系支持人员

(昨天做了后者,将更新答案。)

© www.soinside.com 2019 - 2024. All rights reserved.