# Error Uploading Large Folder

**URL:** <https://discuss.huggingface.co/t/error-uploading-large-folder/165360>\
**Category:** 🤗Datasets\
**Created:** [August 2, 2025, 9:13am UTC](https://discuss.huggingface.co/t/error-uploading-large-folder/165360 "2025-08-02T09:13:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirbastiano94](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sirbastiano94](https://discuss.huggingface.co/u/sirbastiano94)\
**Post date:** [August 2, 2025, 9:13am UTC](https://discuss.huggingface.co/t/error-uploading-large-folder/165360/1 "2025-08-02T09:13:24Z")

</div>

Facing this error:

**Your push was rejected because it contains files larger than 10 MiB. Please use [https://git-lfs.github.com/](https://git-lfs.github.com/) to store large files. See also: [https://hf.co/docs/hub/repositories-getting-started#te](https://hf.co/docs/hub/repositories-getting-started#te)**

I am using: **hf upload-large-folder** from CLI. Before I was able to upload my files. I wonder if I hit some limit on the repo.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [August 2, 2025, 11:21am UTC](https://discuss.huggingface.co/t/error-uploading-large-folder/165360/2 "2025-08-02T11:21:51Z")

</div>

This error appears when `Git LFS` is not installed. [Installation is very simple on Linux and Mac](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage).

On Windows, you need to download and install both `Git` and `Git LFS` from installers.

### For Windows

- [Git](https://git-scm.com/downloads/win)
- [Git LFS](https://git-lfs.com/)

---

<div class="post-metadata">

**Author:** ![sirbastiano94](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sirbastiano94](https://discuss.huggingface.co/u/sirbastiano94)\
**Post date:** [August 2, 2025, 3:35pm UTC](https://discuss.huggingface.co/t/error-uploading-large-folder/165360/4 "2025-08-02T15:35:16Z")

</div>

Git lfs is installed. When uploading to another dataset the code works …

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [August 2, 2025, 9:21pm UTC](https://discuss.huggingface.co/t/error-uploading-large-folder/165360/5 "2025-08-02T21:21:16Z")

</div>

> When uploading to another dataset the code works …

Hmm, that’s strange…

[In the case of quota-related errors, error messages tend to appear that indicate the cause as much as possible](https://github.com/huggingface/huggingface_hub/issues/2518) (such as “Rate Limited”, “429”, “Quota Exceeded”, “[Offending Files](https://discuss.huggingface.co/t/cannot-upload-large-files-for-a-single-repository/88366)”, etc.).

It may really be [some kind of restriction](https://huggingface.co/docs/hub/en/storage-limits)…? 🤔

By the way, I recommend updating `hf_xet` just in case.

```auto
pip install -U huggingface_hub[hf_xet]

```

---

<div class="post-metadata">

**Author:** ![sirbastiano94](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sirbastiano94](https://discuss.huggingface.co/u/sirbastiano94)\
**Post date:** [August 3, 2025, 11:05am UTC](https://discuss.huggingface.co/t/error-uploading-large-folder/165360/6 "2025-08-03T11:05:41Z")

</div>

Yes, there is an offending file referenced in the error: the .gitattributes.

Idk if this make sense to you

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [August 3, 2025, 10:34pm UTC](https://discuss.huggingface.co/t/error-uploading-large-folder/165360/7 "2025-08-03T22:34:31Z")

</div>

Even if specified in `.gitattributes`, it seems impossible to avoid…🤔

Other than that, _an error occurs when the file size is zero_.  
Hmm… It seems difficult to pinpoint the cause based on speculation alone. [Setting the `HF_DEBUG` environment variable to `1`](https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfdebug) allows you to [see detailed error messages](https://github.com/huggingface/huggingface_hub/issues/2936#issuecomment-2735793245).
