Github file size limit changed 6/18/13. Can't push now

前端 未结 6 542
灰色年华
灰色年华 2020-11-28 08:07

How does this change as of June 18, 2013 affect my existing repository with a file that exceeds that limit? I last pushed 2 months ago with a large file.

I have a l

相关标签:
6条回答
  • 2020-11-28 08:32

    I tried a couple of the above answers with no luck. But eventually I found a solution using Github Desktop. Click 'Repository', 'Undo most recent commit'. It allowed me to do it twice, just enough to remove the offending commit. (I had already deleted the large files from the repository).

    0 讨论(0)
  • 2020-11-28 08:40

    Hi you could solve easily in this way:

    git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch FILENAME.TAR' --prune-empty --tag-name-filter cat -- --all

    link: https://help.github.com/articles/remove-sensitive-data

    0 讨论(0)
  • 2020-11-28 08:43

    According to GitHub's new file size limit (also: working with large files), instituted only hours ago, GitHub now has new policies of a 1GB filesize repository, warnings for pushes of files over 50 MB and complete rejection for fileuploads of 100MB.

    GitHub warns you when you push a file larger than 50 MB. We'll reject pushes containing files larger than 100 MB. We do this for a few reasons.

    You have a few options, but not many:

    • Upload your 100 MB+ files to a different service and share with that instead
    • Reduce the filesize of problematic files
    • Find a new repository
    0 讨论(0)
  • 2020-11-28 08:46

    As rlb.usa noted, Github has added a file size limit that prevents you from pushing files > 100MB. You tried to remove the file in a new commit and tried to push that. That fails, because you are not just pushing that last commit, but also three others. Those three commits contain versions of cron_log that are 141MB and 126MB in size. They cause your push to fail.

    To fix that, you have two options:

    • Run git rebase -i origin/master, set every commit to edit and remove the file in each with git commit --amend.
    • Use the BFG Repo-Cleaner to clean all your history.
    0 讨论(0)
  • 2020-11-28 08:50

    The actual limit for each file on GitHub is 100 MiB, not 100 MB.

    Demo: https://github.com/Franck-Dernoncourt/github-max-file-size


    https://help.github.com/articles/what-is-my-disk-quota/ (mirror) erroneously claims that they place a strict limit of files exceeding 100 MB in size

    The confusion between MB and MiB can be seen when pushing: in the example below, the error message from GitHub server indicates the file is 101 MB whereas git correctly indicates it is 101 MiB:

    ~\Documents\GitHub\test123 [master ↑1 +3 ~0 -0 !]> git push
    Counting objects: 3, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 101.03 MiB | 896.00 KiB/s, done.
    Total 3 (delta 1), reused 0 (delta 0)
    remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
    remote: error: GH001: Large files detected. You may want to try Git Large File S
    torage - https://git-lfs.github.com.
    remote: error: Trace: e9206a9cd05c4ff5de79bba9d4caf9df
    remote: error: See http://git.io/iEPt8g for more information.
    remote: error: File 101MB is 101.00 MB; this exceeds GitHub's file size limit of
     100.00 MB
    To https://github.com/Franck-Dernoncourt/test123.git
     ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'https://github.com/Franck-Dernoncourt/test12
    3.git'
    ~\Documents\GitHub\test123 [master ↑1 +3 ~0 -0 !]>
    
    0 讨论(0)
  • 2020-11-28 08:50

    Use this Python script to clean your repo of large files (I used it to on my repo and it worked great) https://gist.github.com/1433794

    0 讨论(0)
提交回复
热议问题