54

I'm looking to have Git as the primary source control for my employer (250 people) company. Before proceeding further I would like to have answers to the following questions.

  1. Does Git have any specific max file size limit that it can handle? If so, what is it?

  2. What is the max repository size recommended by Git? This would help me determine the housekeeping I should set on the repository.

TRiG
  • 10,148
  • 7
  • 57
  • 107
vengateswaran c
  • 1,363
  • 3
  • 11
  • 12
  • 3
    Possible duplicate of [File number and size limits in Git](http://stackoverflow.com/q/984707/456814). –  Jun 11 '14 at 03:32
  • I recently had a branch screwed up because of commit and push to origin files greater than 50mb. I stored the files offline and had to re-create the branch. I presume it's possible that Github will vary this limit for you depending on how much you pay. – NeilG Mar 07 '23 at 07:50

3 Answers3

51

As mentioned in Git limits, Git has no file size or file number limit per se.
But it:

Alexander Derck
  • 13,818
  • 5
  • 54
  • 76
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
27

Rule of thumb: 1GB per repository, 100MB per file

For best performance, github recommend repositories be kept under 1GB each. This limit is easy to stay within if large files (typically, binaries) are kept out of the repository. If your repository exceeds 1GB, you might receive a polite email from support requesting that you reduce the size of the repository to bring it back down under 1GB.

In addition, we place a strict limit of files exceeding 100 MB in size. For more information on why this is, see our article on working with large files.

Look at: Managing Large Files / What is my disk quota? (it refers to both GitHub and Git capabilities.)

ArekBulski
  • 4,520
  • 4
  • 39
  • 61
user2454691
  • 435
  • 4
  • 7
  • 5
    I think this answer is better than I initially thought. His source backs up what he says. – ArekBulski Apr 22 '15 at 19:43
  • Here a slightly broader answer: https://stackoverflow.com/a/3605544/7127519 – Rafael Valero May 03 '18 at 11:14
  • As you mentioned _"email from support requesting [...] to bring it back down under 1GB"_, is there some goto documentation about how to? – luckydonald Oct 17 '18 at 10:23
  • 8
    This answer should be deleted since the question is about git, not about GitHub. For a thread about GitHub limits, see [here](https://stackoverflow.com/questions/38768454/repository-size-limits-for-github-com). – Asclepius Dec 25 '19 at 14:09
3

As of 2018-04-20 Git for Windows has a bug which effectively limits the file size to 4GB max using that particular implementation (this bug propagates to lfs as well).

Kim Sullivan
  • 943
  • 2
  • 10
  • 15