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 your GitHub Enterprise instance, consider introducing Git Large File Storage (Git LFS) as part of your workflow. Git LFS 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."

Conditions for large files

GitHub Enterprise 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 your GitHub Enterprise instance.

Distributing large binaries

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