A Git repository contains every version of every file. But for some file types, this is not practical. Multiple revisions of large files increase the clone and fetch times for other users of a repository.

Git requires every repository to have as much free space on a hard drive as consumed space at all times. For example, if a repository is 1GB, Git requires 1GB of additional free space to be available.

In order to keep your repository manageable for you and your collaborators, we suggest that you keep the following types of files:

  • Code files
  • Versioned assets, such as graphics
  • Large configuration files

We suggest removing the following types of files:

  • Database dumps
  • Log files

Tip: If you regularly push large files to GitHub, consider introducing Large File Storage as part of your workflow. Large File Storage works well with the GitHub Flow and can be used with any large file, regardless of its type. For more information, see "Versioning large files."

For more information on managing your repository's size, see "What is my disk quota?".

Conditions for large files

GitHub will warn you when pushing files larger than 50 MB. You will not be allowed to push files larger than 100 MB.

Removing large files from a repository

To remove a large file from your repository, you must completely remove it from your local repository and from GitHub.

Distributing large binaries

Some projects require distributing large files, such as binaries or installers, in addition to distributing source code.