我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们

我的磁盘配额是多少?

GitHub tries to provide abundant storage for all Git repositories, although there are hard limits for file and repository sizes.

本文内容

Tip: If you regularly push large files to GitHub, consider using Git Large File Storage (Git LFS). 更多信息请参阅“大型文件版本管理”。

文件和仓库大小限制

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 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 files in a repository. 更多信息请参阅“使用大文件”。

注:如果您通过浏览器将文件添加到仓库,该文件不得大于 25 MB。 For more information, see "Adding a file to a repository."

备份

Git is not designed to serve as a backup tool. However, there are many solutions specifically designed for performing backups, such as Arq, Carbonite, and CrashPlan.

数据库转储

Version control systems, such as Git, are not designed to handle large SQL files. To share large databases with other developers, we recommend using Dropbox.

Git shouldn't be used to backup your production servers. For more information, see "Backups."

外部依赖项

External dependencies can cause Git repositories to become very large. To avoid filling a repository with external dependencies, we recommend you use a package manager. Popular package managers for common languages include Bundler, Node's Package Manager, and Maven. These package managers support using Git repositories directly, so you don't need pre-packaged sources.

打包的发行版本

我们不建议分发仓库中已编译的代码和预先打包的发行版。 For more information, see "Distributing large binaries."

更改现有仓库的历史记录

If you already have a repository that's quite large, you can reduce the size of a repository by removing large files from the repository's history. For more information, see "Removing files from a repository's history."

问问别人

找不到要找的内容?

联系我们