5

I uploaded an HTML file to a GitHub repository two different ways: drag and drop and add/commit/push using Git on Terminal. In both cases I received the error that the file is too big to display, yet it is only 1.06 MB. I've searched the documentation on GitHub and here on SO. Any thoughts please?

enter image description here

pjv
  • 173
  • 3
  • 12

1 Answers1

6

This seems expected: GitHub will not show the content (or a diff) of a file larger than a certain size (over 1MB).

See nodejs/node issue 5533 and nodejs/node PR 6337 as an example.

How that file was added (drag and drop or regular push) will not change what is a server-side policy.


If, later on, one would need to see that file, you can:

Most of those advises derive from the work/articles done by Derrick Stolee from Microsoft:

  • In a partial clone, some data is not served immediately and is delayed until the client needs it.
  • Blobless clones skip blobs except those needed at checkout time.
  • Treeless clones skip all trees in the history in favor of downloading a full copy of the trees needed for each checkout.

https://github.blog/wp-content/uploads/2020/12/data-ratio-blobless.png

So if cloning the repo is what you need in order to see those files... you have options to do so in an economical way, without downloading too much.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250