GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — File too large in the GIT history · Issue #5140 · scratchfoundation/scratch-gui

This repository was archived by the owner on Jun 10, 2026. It is now read-only.
This repository was archived by the owner on Jun 10, 2026. It is now read-only.

File too large in the GIT history #5140

Copy link
Copy link
Closed
Closed
File too large in the GIT history#5140
Copy link

Description

@garrapato
garrapato
opened on Sep 1, 2019
Issue body actions

I have noticed that the repository contains a very large file in the GIT history. Is it possible that someone made a commit with some file or directory by mistake? It can be for example nodes_modules or some other like that, unless that really is the correct size of the repository.

I just made a clone of the repository and it took a long time to download it.

The file I refer to in a fresh clone of the repository is:

scratch-gui/.git/objects/pack/pack-c81e535f2cf1cd650ef7a6e69553ee444473a465.pack

Expected Behavior

Less time to clone (download) the repo

Actual Behavior

I just made a clone of the repository and it took a very long time to download it.

Steps to Reproduce

$ git clone https://github.com/LLK/scratch-gui.git
Cloning into 'scratch-gui'...
remote: Enumerating objects: 48, done.
remote: Counting objects: 100% (48/48), done.
remote: Compressing objects: 100% (47/47), done.
Receiving objects:  100% (67966/67966), 11.68 MiB | 815.00 KiB

$ cd scratch-gui
$ du -ch . | grep "G\t"
1.0G	./.git/objects/pack
1.1G	./.git/objects
1.1G	./.git
1.1G	.
1.1G	total

$ cd ./.git/objects/pack
$ ll
total 2199344
-r--r--r--  1 garrapato  staff     1904120 Sep  1 06:09 pack-c81e535f2cf1cd650ef7a6e69553ee444473a465.idx
-r--r--r--  1 garrapato  staff  1111074667 Sep  1 06:24 pack-c81e535f2cf1cd650ef7a6e69553ee444473a465.pack

The file already measures more than 1 GB!

Possible solution

If a file or directory was uploaded (committed) by mistake, it must be deleted from the story and the following article shows how to do it:

Removing sensitive data from a repository

Operating System and Browser

Mac OS 10.11.14
Chrome Versión 76.0.3809.132 (Build oficial) (64 bits)

I hope this information will be useful

Regards

Activity

  1. apple502j commented on Sep 1, 2019

    @apple502j
    apple502j
    on Sep 1, 2019
    Contributor
    More actions

    Maybe this is because of tutorial animated GIFs. We recommend the use of --depth 10 when cloning this repo.

  2. Kenny2github commented on Sep 2, 2019

    @Kenny2github
    Kenny2github
    on Sep 2, 2019
    Contributor
    More actions

    In general, this repo's length commit history will make a full clone take an incredible amount of time. I recommend --depth 1 rather than 10 because it really can get to be too much.

  3. rschamp commented on Feb 10, 2020

    @rschamp
    rschamp
    on Feb 10, 2020
    Contributor
    More actions

    There are indeed a large number of static image files. There's not anything we can do about the size of the history without causing a lot of conflicts.

  4. rschamp
    closed this as completedon Feb 10, 2020
  5. matschaffer commented on Feb 18, 2022

    @matschaffer
    matschaffer
    on Feb 18, 2022
    More actions

    Do maintainers typically just take the time/space for a full clone? I was under the impression you can't branch/commit/pull on a shallow clone.

  6. matschaffer commented on Feb 18, 2022

    @matschaffer
    matschaffer
    on Feb 18, 2022
    More actions

    I just did that. Looks like it's 1.9GB on disk and took about 33min on my connection for a full clone.

  7. matschaffer commented on Feb 18, 2022

    @matschaffer
    matschaffer
    on Feb 18, 2022
    More actions

    I was curious so I tried this https://stackoverflow.com/a/42544963/69002

    It seems like what's taking up a lot of the space is dependencies being commited to the gh-pages branch. LIke d33ef36 for example.

    Those lib.min.js seem to be 15MB-20MB each and get committed a few times a day in a few different subdirectories.

  8. andreabedini commented on Dec 6, 2022

    @andreabedini
    andreabedini
    on Dec 6, 2022
    More actions

    With the insight that big files are only in the gh-pages branch (which is usually disconnected from main), the situation can be improved using --single-branch when cloning.

    ~/code/scratch 
    ❯ git clone https://github.com/LLK/scratch-gui --single-branch 
    Cloning into 'scratch-gui'...
    remote: Enumerating objects: 44888, done.
    remote: Counting objects: 100% (56/56), done.
    remote: Compressing objects: 100% (26/26), done.
    remote: Total 44888 (delta 38), reused 44 (delta 30), pack-reused 44832
    Receiving objects: 100% (44888/44888), 313.38 MiB | 4.37 MiB/s, done.
    Resolving deltas: 100% (29577/29577), done.
    
    ~/code/scratch [⏱ 1m14s]
    ❯ du -hs scratch-gui
    392M	scratch-gui
    

    ~1 minute and ~400MB seem acceptable.

    Reacted by Mat Schaffer and Maite-Aileen Brandt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.