git GitHub.com 的存储库大小限制
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38768454/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Repository size limits for GitHub.com
提问by
Lately I have been using GitHub and I'm wondering, what is the repository limit for files hosted on github.com? I've been wondering this because I was thinking of using GitLab since it allows 10 GB for each repository.
最近我一直在使用 GitHub,我想知道 github.com 上托管的文件的存储库限制是多少?我一直想知道这一点,因为我正在考虑使用 GitLab,因为它允许每个存储库 10 GB。
采纳答案by Tim Biegeleisen
From GitHub's documentation:
来自 GitHub 的文档:
GitHub doesn't have any set disk quotas. We try to provide abundant storage for all Git repositories, within reason. Keeping repositories small ensures that our servers are fast and downloads are quick for our users.
GitHub 没有任何设置的磁盘配额。我们尝试在合理范围内为所有 Git 存储库提供充足的存储空间。保持存储库较小可确保我们的服务器运行速度快,用户下载速度也快。
and
和
In addition, we place a strict limit of files exceeding 100 MB in size.
此外,我们对超过 100 MB 的文件进行了严格限制。
Now for the non-canned part of my answer. GitHub might allow you to store files up to 100MB, but you should also be vigilant to notversion binary or other similar blob type files. The reason for this is that Git doesn't handle binaries well, and storage can be a big penalty. So if you find yourself pushing 100MB per file, you should check what type of file you are dealing with.
现在是我答案的非罐头部分。GitHub 可能允许您存储最多 100MB 的文件,但您也应该警惕不要版本二进制或其他类似的 blob 类型文件。这样做的原因是 Git 不能很好地处理二进制文件,并且存储可能是一个很大的损失。因此,如果您发现每个文件需要 100MB,您应该检查您正在处理的文件类型。
回答by Acumenus
Limits
限制
As of April 2020, the GitHub docsexcerpted below state that the hard limits are 100 GB per repositoryand 100 MB per file:
截至 2020 年 4 月,以下摘录的 GitHub文档指出硬限制为每个存储库 100 GB和每个文件 100 MB:
we recommend repositories be kept under 1GB each. Keeping repositories small ensures that our servers are fast and downloads are quick. If your repository does exceed 1GB, you might receive a email from GitHub Support asking you to reduce it.
Repositories have a hard size limit of 100GB.If you reach 75GB, you'll receive a warning from Git in your terminal the next time you push a change. In addition, we place a strict maximum size limit of 100 MB for individual filesin a repository.
If you add a file to a repository via a browser, the file can be no larger than 25 MB.
我们建议每个存储库保持在 1GB 以下。保持存储库较小可确保我们的服务器速度快且下载速度快。如果您的存储库超过 1GB,您可能会收到来自 GitHub 支持的电子邮件,要求您减少它。
存储库的硬性大小限制为 100GB。如果达到 75GB,下次推送更改时,您将在终端中收到来自 Git 的警告。此外,我们为存储库中的单个文件设置了 100 MB 的严格最大大小限制。
如果您通过浏览器将文件添加到存储库,则该文件不能大于 25 MB。
I assume that one can safely ignore all warnings preceding the hard limit, and I have no evidence to believe otherwise.
我假设人们可以安全地忽略硬限制之前的所有警告,而且我没有证据表明情况并非如此。
Checking usage
检查使用情况
The size of each repo to which you directly (not via a group) have Admin access is shown at https://github.com/settings/repositories.
您直接(而不是通过组)具有管理员访问权限的每个存储库的大小显示在https://github.com/settings/repositories。
Bypassing file size limit
绕过文件大小限制
The file size limit can however be bypassed using a tool such as Git LFS. [help]
但是,可以使用Git LFS等工具绕过文件大小限制。[帮助]
Alternatively, if it works for your application, a tool such as tar
can be used to split a large file into 100 MB parts.
或者,如果它适用于您的应用程序,tar
则可以使用诸如可用于将大文件拆分为 100 MB 的部分的工具。
回答by gdziadkiewicz
According to https://help.github.com/articles/what-is-my-disk-quota/and https://help.github.com/articles/working-with-large-files/there is not limit on the repo size, but after exceeding 1 GB they might email you and ask to reduce the size. Additionally you will see warnings for pushing files bigger than 50 MB and files bigger than 100 MB won't be accepted.
根据https://help.github.com/articles/what-is-my-disk-quota/和https://help.github.com/articles/working-with-large-files/没有限制存储库大小,但在超过 1 GB 后,他们可能会向您发送电子邮件并要求减小大小。此外,您将看到推送大于 50 MB 的文件的警告,并且不会接受大于 100 MB 的文件。
回答by Ganesa Vijayakumar
File and repository size limitations
文件和存储库大小限制
To ensure good performance for our users, we recommend repositories be kept under 1GB each. Keeping repositories small ensures that our servers are fast and downloads are quick. If your repository does exceed 1GB, you might receive an email from GitHub Support asking you to reduce it.
为了确保我们用户的良好性能,我们建议每个存储库保持在 1GB 以下。保持存储库较小可确保我们的服务器速度快且下载速度快。如果您的存储库确实超过 1GB,您可能会收到来自 GitHub 支持的电子邮件,要求您减少它。
Repositories have a hard size limit of 100GB. If you reach 75GB, you'll receive a warning from Git in your terminal the next time you push a change. In addition, we place a strict maximum size limit of 100 MB for individual files in a repository
存储库的硬性大小限制为 100GB。如果达到 75GB,下次推送更改时,您将在终端中收到来自 Git 的警告。此外,我们为存储库中的单个文件设置了 100 MB 的严格最大大小限制
Source: Github -> what-is-my-disk-quota
来源:Github -> what-is-my-disk-quota
Note: If you add a file to a repository via a browser, the file can be no larger than 25 MB. For more information
注意:如果您通过浏览器将文件添加到存储库,则该文件不能大于 25 MB。想要查询更多的信息
回答by Stepan Yakovenko
My solution is to split file into blocks with tarand thus overcome 100M per file limit.
我的解决方案是使用tar将文件拆分为块,从而克服每个文件 100M 的限制。