# Git lfs enabled but git push throwing error file larger then 10MB

**URL:** <https://discuss.huggingface.co/t/git-lfs-enabled-but-git-push-throwing-error-file-larger-then-10mb/49198>\
**Category:** 🤗Hub\
**Created:** [August 2, 2023, 7:11pm UTC](https://discuss.huggingface.co/t/git-lfs-enabled-but-git-push-throwing-error-file-larger-then-10mb/49198 "2023-08-02T19:11:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![psmathur](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/psmathur/32/18169_2.png) [@psmathur](https://discuss.huggingface.co/u/psmathur)\
**Post date:** [August 2, 2023, 7:11pm UTC](https://discuss.huggingface.co/t/git-lfs-enabled-but-git-push-throwing-error-file-larger-then-10mb/49198/1 "2023-08-02T19:11:52Z")

</div>

I have done this multiple times in past successfully, however, as of last 2 days I am having issues, following exact same steps, which I am using on same machine, while uploading artifacts from SOME\_REPO git throws me error file larger than 10MB. Here are the steps I am following:

```auto
python -m pip install huggingface_hub

huggingface-cli login

git clone https://huggingface.co/psmathur/SOME_REPO

cd SOME_REPO

git lfs install

huggingface-cli lfs-enable-largefiles .

cd ..

cp -r LOCAL_REPO/checkpoint SOME_REPO

cd SOME_REPO

git add .

git config --global user.email "MY_EMAIL@gmail.com"

git config --global user.name "MY_NAME"

git commit -m "Initial Commit"

git push

```

This throws me error error file larger then 10MB

Here is the `huggingface-cli env ` output:

```auto
- huggingface_hub version: 0.16.4
- Platform: Linux-5.15.0-1042-azure-x86_64-with-glibc2.31
- Python version: 3.10.0
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/azureuser/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: psmathur
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.0.1
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: N/A
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: 1.25.2
- pydantic: N/A
- aiohttp: 3.8.5
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/azureuser/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/azureuser/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/azureuser/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False

```

Any suggestion would be highly appreciated.

---

<div class="post-metadata">

**Author:** ![trusktr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/trusktr/32/37636_2.png) [@trusktr](https://discuss.huggingface.co/u/trusktr)\
**Post date:** [December 16, 2024, 3:58am UTC](https://discuss.huggingface.co/t/git-lfs-enabled-but-git-push-throwing-error-file-larger-then-10mb/49198/2 "2024-12-16T03:58:34Z")

</div>

I’m having the same issue.

```auto
❯ git lfs install --force
Updated Git hooks.
Git LFS initialized.

❯ git push --recurse-submodules=no hf main -f
Enumerating objects: 18207, done.
Counting objects: 100% (18207/18207), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5958/5958), done.
Writing objects: 100% (18207/18207), 72.05 MiB | 412.15 MiB/s, done.
Total 18207 (delta 13634), reused 16293 (delta 11969), pack-reused 0
remote: Resolving deltas: 100% (13634/13634), done.
remote: -------------------------------------------------------------------------
remote: Your push was rejected because it contains files larger than 10 MiB.
remote: Please use https://git-lfs.github.com/ to store large files.
remote: See also: https://hf.co/docs/hub/repositories-getting-started#terminal
remote: 
remote: Offending files:
remote: - docs/examples/velodyne-lidar-scan/shelby-scene.ply (ref: refs/heads/main)
remote: - docs/examples/velodyne-lidar-scan/shelby-scene.ply (ref: refs/tags/v0.3.0-alpha.10)
remote: - docs/examples/velodyne-lidar-scan/shelby-scene.ply (ref: refs/tags/v0.3.0-alpha.11)
... etc ...

```

The `.git/config` shows that it is enabled (I think?):

```auto
[remote "hf"]
	url = https://trusktr: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@huggingface.co/spaces/lume-creative/lume
	fetch = +refs/heads/*:refs/remotes/hf/*
[lfs]
	repositoryformatversion = 0
[lfs "https://trusktr:<TOKEN>@huggingface.co/spaces/lume-creative/lume.git/info/lfs"]
	locksverify = false

```

but `git push` still fails.

Here’s my `huggingface-cli env`, which I don’t think really matters:

```auto
❯ huggingface-cli env
/Users/trusktr/Library/Python/3.9/lib/python/site-packages/urllib3/ __init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(

Copy-and-paste the text below in your GitHub issue.

- huggingface_hub version: 0.26.5
- Platform: macOS-15.0.1-arm64-arm-64bit
- Python version: 3.9.6
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Running in Google Colab Enterprise ?: No
- Token path ?: /Users/trusktr/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: trusktr
- Configured git credential helpers: osxkeychain
- FastAI: N/A
- Tensorflow: N/A
- Torch: N/A
- Jinja2: N/A
- Graphviz: N/A
- keras: N/A
- Pydot: N/A
- Pillow: N/A
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: N/A
- pydantic: N/A
- aiohttp: N/A
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /Users/trusktr/.cache/huggingface/hub
- HF_ASSETS_CACHE: /Users/trusktr/.cache/huggingface/assets
- HF_TOKEN_PATH: /Users/trusktr/.cache/huggingface/token
- HF_STORED_TOKENS_PATH: /Users/trusktr/.cache/huggingface/stored_tokens
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 10

```

Any idea why Git LFS is not working?

---

<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:** [December 16, 2024, 4:15am UTC](https://discuss.huggingface.co/t/git-lfs-enabled-but-git-push-throwing-error-file-larger-then-10mb/49198/3 "2024-12-16T04:15:24Z")

</div>

From the directory structure, your environment is probably Windows. In the case of Windows, git-lfs will not work properly unless **the latest version of git itself** is also installed in addition to git-lfs.  
Of course, there is also the possibility of more complex problems.

> **[Git Large File Storage](https://git-lfs.com/)**
>
> Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.

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

---

<div class="post-metadata">

**Author:** ![trusktr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/trusktr/32/37636_2.png) [@trusktr](https://discuss.huggingface.co/u/trusktr)\
**Post date:** [December 16, 2024, 4:16am UTC](https://discuss.huggingface.co/t/git-lfs-enabled-but-git-push-throwing-error-file-larger-then-10mb/49198/4 "2024-12-16T04:16:27Z")

</div>

> [@John6666](#):
>
> Windows

I’m on macOS actually. It’s a MacBook Air M2.

I’m just learning about Git LFS, never used it before, but seems very cumbersome to set up. I wouldn’t want to re-write my whole history to do that.

---

<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:** [December 16, 2024, 4:17am UTC](https://discuss.huggingface.co/t/git-lfs-enabled-but-git-push-throwing-error-file-larger-then-10mb/49198/5 "2024-12-16T04:17:10Z")

</div>

Oh… I mistook.😅 Macs are almost all UNIX now, so they shouldn’t be that different from Linux…

> **[Installing Git Large File Storage - GitHub Docs](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage?platform=mac)**
>
> In order to use Git LFS, you'll need to download and install a new program that's separate from Git.

---

<div class="post-metadata">

**Author:** ![trusktr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/trusktr/32/37636_2.png) [@trusktr](https://discuss.huggingface.co/u/trusktr)\
**Post date:** [December 16, 2024, 4:22am UTC](https://discuss.huggingface.co/t/git-lfs-enabled-but-git-push-throwing-error-file-larger-then-10mb/49198/6 "2024-12-16T04:22:14Z")

</div>

Yeah, I think its just that migrating my history to Git LFS seems daunting. I’m a newb, so I didn’t realize that `git lfs install` was not enough, now I need to migrate my repo which seems like a big hassle.

It would be sweet if HuggingFace can [match GitHub file size](https://discuss.huggingface.co/t/feature-request-match-github-file-size-limits/131646), so that at least migrating from GitHub will be super easy.

---

<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:** [December 16, 2024, 4:25am UTC](https://discuss.huggingface.co/t/git-lfs-enabled-but-git-push-throwing-error-file-larger-then-10mb/49198/7 "2024-12-16T04:25:16Z")

</div>

You’ve solved it!😀 Requests for HF are being accepted in the post below.

> **[@victor on Hugging Face: "🙋 Calling all Hugging Face users! We want to hear...](https://huggingface.co/posts/victor/964839563451127)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.
