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

Consider reducing the .git history size by removing large binary blobs #2396

Open
schoffelen opened this issue Mar 12, 2024 · 1 comment
Open
Labels

Comments

@schoffelen
Copy link
Contributor

Currently a clone of the repo is getting quite sizeable (~1.8GB) where a lot of stuff is (of course) contained in the history in the .git folder. In the context of another repo I have found a way to remove large binary blobs from the git history. Is this something we could consider here as well? The attached

inspect_blobs.txt

lists the blobs, sorted on size. I used a recipe that is documented here: https://medium.com/@prankulgarg/want-to-remove-large-files-blobs-from-git-history-permanently-4723e72a84e1

@robertoostenveld
Copy link
Contributor

I believe it is better to make a shallow clone of a repository, in which not all historical commits (and blobs) are not be present by default. See https://www.perforce.com/blog/vcs/git-beyond-basics-using-shallow-clones

To me that seems like a better solution, as it does not require rewriting of history and would not break the forks that other people have of the repository (as the history of those would still be the original).

Could you try this out?

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

No branches or pull requests

2 participants