Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repository size #74

Closed
DanielRuf opened this issue Sep 4, 2018 · 7 comments
Closed

repository size #74

DanielRuf opened this issue Sep 4, 2018 · 7 comments

Comments

@DanielRuf
Copy link
Contributor

DanielRuf commented Sep 4, 2018

The repository is 190MB big, a bit too much.

$ java -jar bfg-1.13.0.jar --strip-blobs-bigger-than 10M react-proto.git

Using repo : C:\Users\Daniel\GITHUB\react-proto.git

Scanning packfile for large blobs: 1798
Scanning packfile for large blobs completed in 201 ms.
Found 6 blob ids for large blobs - biggest=75874617 smallest=14455790
Total size (unpacked)=233273637
Found 80 objects to protect
Found 9 commit-pointing refs : HEAD, refs/heads/chore/icon-update, refs/heads/chore/npm_setup, ...

Protected commits
-----------------

These are your protected commits, and so their contents will NOT be altered:

 * commit e49cebbd (protected by 'HEAD') - contains 6 dirty files :
        - assets/dragging.gif (19,6 MB)
        - assets/export.gif (13,8 MB)
        - ...

WARNING: The dirty content above may be removed from other commits, but as
the *protected* commits still use it, it will STILL exist in your repository.

Details of protected dirty content have been recorded here :

C:\Users\Daniel\GITHUB\react-proto.git.bfg-report\2018-09-04\23-23-05\protected-dirt\

If you *really* want this content gone, make a manual commit that removes it,
and then run the BFG on a fresh copy of your repo.


Cleaning
--------

Found 208 commits
Cleaning commits:       100% (208/208)
Cleaning commits completed in 673 ms.

Updating 8 Refs
---------------

        Ref                               Before     After
        -----------------------------------------------------
        refs/heads/chore/icon-update    | b562ff36 | 40857396
        refs/heads/chore/npm_setup      | 97430a55 | 530293a1
        refs/heads/master               | e49cebbd | 8957078e
        refs/heads/staging              | efc53ba9 | 92c5606d
        refs/heads/tests/test-node-8-10 | 6ef63359 | 61cc0e24
        refs/tags/v0.1                  | b9c7c315 | 77f5e3db
        refs/tags/v0.1.0                | c672622d | e136ce60
        refs/tags/v1.0.0                | 7dfad85e | fd8b4127

Updating references:    100% (8/8)
...Ref update completed in 60 ms.

Commit Tree-Dirt History
------------------------

        Earliest                                              Latest
        |                                                          |
        ................................DmmmmmmmmDDDDDDDDDDDDDDDDDDD

        D = dirty commits (file tree fixed)
        m = modified commits (commit message or parents changed)
        . = clean commits (no changes to file tree)

                                Before     After
        -------------------------------------------
        First modified commit | db6e4330 | f0469df1
        Last dirty commit     | 6ef63359 | 61cc0e24

Deleted files
-------------

        Filename             Git id
        ---------------------------------------
        Electron Framework | a75a08b3 (72,0 MB)
        React-Proto.dmg    | e7add635 (72,4 MB)
        dragging.gif       | 42b7d492 (19,6 MB)
        export.gif         | d840cc18 (13,8 MB)
        hierarchy.gif      | a7b8f071 (27,6 MB)
        libnode.dylib      | a040de87 (17,1 MB)


In total, 168 object ids were changed. Full details are logged here:

        C:\Users\Daniel\GITHUB\react-proto.git.bfg-report\2018-09-04\23-23-05

BFG run is complete! When ready, run: git reflog expire --expire=now --all && git gc --prune=now --aggressive


--
You can rewrite history in Git - don't let Trump do it for real!
Trump's administration has lied consistently, to make people give up on ever
being told the truth. Don't give up: https://www.aclu.org/
--
@derskeal
Copy link
Contributor

derskeal commented Sep 4, 2018

I agree.

@DanielRuf
Copy link
Contributor Author

Instead of gif use mp4 / h264.

See https://images.guide/

@DanielRuf
Copy link
Contributor Author

Unfortunately we can not undo this without creating a new clean branch or new clean repository which gets the cleaned up history of https://github.com/React-Proto/react-proto/compare/master...DanielRuf:chore/cleanup-repo?expand=1

@refinedblessing
Copy link
Contributor

Hi @DanielRuf, thanks so much for this.
What do you think is the best way to go about this starting with the gifs?
Instead of having to rewrite the whole history, can we gradually make changes to specific parts?

@DanielRuf
Copy link
Contributor Author

Instead of having to rewrite the whole history, can we gradually make changes to specific parts?

Not without making changes to the history (git rebase + push -f). As this changes / recalculates the commit hashes it will be a different history starting from the first dirty commit.

It's like in real life. You csn not change / rewrite history without changing it in all books (clones) and so on.

Electron is just Chrome for rendering and it natively supports mp4 / h264. Also we can pause videos.

We would have to create a new branch (and set it as default) or create a new repo and rebase all PRs.

@DanielRuf
Copy link
Contributor Author

There might be more files which should not be there (maybe in the range 2MB - 10MB), I've just checked it with a 10MB threshold setting.

@refinedblessing
Copy link
Contributor

We are currently planning to move the large gifs and images to a hosted service. We could also have something like a prod branch were we can make the history change, so you can make your PR to that branch and then it can be gradually adopted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants