Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 2, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 2, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 2, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 2, 2025

      How Red Hat just quietly, radically transformed enterprise server Linux

      June 2, 2025

      OpenAI wants ChatGPT to be your ‘super assistant’ – what that means

      June 2, 2025

      The best Linux VPNs of 2025: Expert tested and reviewed

      June 2, 2025

      One of my favorite gaming PCs is 60% off right now

      June 2, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      `document.currentScript` is more useful than I thought.

      June 2, 2025
      Recent

      `document.currentScript` is more useful than I thought.

      June 2, 2025

      Adobe Sensei and GenAI in Practice for Enterprise CMS

      June 2, 2025

      Over The Air Updates for React Native Apps

      June 2, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      You can now open ChatGPT on Windows 11 with Win+C (if you change the Settings)

      June 2, 2025
      Recent

      You can now open ChatGPT on Windows 11 with Win+C (if you change the Settings)

      June 2, 2025

      Microsoft says Copilot can use location to change Outlook’s UI on Android

      June 2, 2025

      TempoMail — Command Line Temporary Email in Linux

      June 2, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Operating Systems»Linux»Your push was rejected because it contains files larger than 10 MiB

    Your push was rejected because it contains files larger than 10 MiB

    January 24, 2025

    I am working on a AI model that have a few files larger than 10MiB of trained model. While pushing those models to huggingface repository I got an error saying the files are too large to upload. Hugging Face has a size limit for single files, and files larger than 10MiB need special handling. This means I need to change the way I upload or store these files.

    This article will help you understand why this error happens and how you can fix it. You will learn how to push large files to a Hugging Face repository step by step.

    The Error

    Enumerating objects: 11, done.
    Counting objects: 100% (11/11), done.
    Delta compression using up to 16 threads
    Compressing objects: 100% (11/11), done.
    Writing objects: 100% (11/11), 326.86 MiB | 1.72 MiB/s, done.
    Total 11 (delta 1), reused 0 (delta 0), pack-reused 0
    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:   - my_model.safetensors (ref: refs/heads/master)
    remote: -------------------------------------------------------------------------
    To https://huggingface.co/tecadmin/testing-model
     ! [remote rejected] master -> master (pre-receive hook declined)
    

    The error indicates that you’re trying to push a file larger than 10 MiB to your Hugging Face repository without using Git Large File Storage (LFS). Hugging Face requires files over 10 MiB to be stored using Git LFS.

    Steps to Push Large Files Using Git LFS

    Here is the step by step instructions to resolve this issue:

    Hostinger
    1. Install Git LFS:
    2. First, ensure that Git LFS (Large File Storage) is installed on your system. You can install it by running the following command:
      git lfs install
      

    3. Track Large Files: Identify the files larger than 10 MiB and track them with Git LFS. Run this command to track the specific file type or file:
      git lfs track "*.model"  # Replace *.model with your file type or specific file name
      

      This will add a reference to .gitattributes, telling Git to use LFS for those files.

    4. Add and Commit Changes:

      Add the changes to your repository, including the .gitattributes file, and commit them. Use the following commands:

      git add .gitattributes
      git add <file_name>
      git commit -m "Add large files using Git LFS"
      
    5. Push to the Repository: Push your changes to the Hugging Face repository. The tracked large files will now be uploaded using Git LFS.
      git push
      
    6. Verify File Upload: Check your Hugging Face repository to confirm that the large files have been successfully uploaded.

    By following these steps, you can easily resolve the issue of uploading files larger than 10 MiB to your Hugging Face repository.

    Still Getting Same Error

    If you are still facing the same issue, it may be your repository already contains a large file, you may need to remove it and re-commit using Git LFS:

    git rm --cached my_model.safetensors
    git add my_model.safetensors
    git commit -m "Re-add large file with Git LFS"
    git push origin master
    

    The post Your push was rejected because it contains files larger than 10 MiB appeared first on TecAdmin.

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleZEISS Demonstrates the Power of Scalable Workflows with Ampere Altra and SpinKube
    Next Article Error’d: Office Politics

    Related Posts

    Operating Systems

    You can now open ChatGPT on Windows 11 with Win+C (if you change the Settings)

    June 2, 2025
    Operating Systems

    Microsoft says Copilot can use location to change Outlook’s UI on Android

    June 2, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    Medusa ransomware targets Gmail and Outlook users, warns CISA & FBI

    Operating Systems

    New VMware Tools Vulnerability Allows Attackers to Tamper with Virtual Machines, Broadcom Issues Urgent Patch

    Development

    Glassmorphism: Definition and Best Practices

    Development

    Microsoft confirmed release dates for native ARM64 Adobe Premiere Pro, Illustrator, InDesign, and After Effects for Qualcomm Snapdragon laptops

    Development

    Highlights

    How to get a free Windows (or Linux) recovery image for your Dell, HP, Lenovo, or Microsoft Surface PC

    July 31, 2024

    What’s better than a clean install? How about a clean installation that includes all required…

    Updating the Frontier Safety Framework

    May 27, 2025

    I changed 10 OnePlus phone settings to significantly improve the user experience

    May 29, 2025

    Google AI Releases MedGemma: An Open Suite of Models Trained for Performance on Medical Text and Image Comprehension

    May 20, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.