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

Reducing size of .git folder #215

Open
IndrajeetPatil opened this issue Mar 23, 2022 · 5 comments
Open

Reducing size of .git folder #215

IndrajeetPatil opened this issue Mar 23, 2022 · 5 comments
Labels
Enhancement 💥 New feature or request Help us 👀 Extra attention is needed

Comments

@IndrajeetPatil
Copy link
Member

Noticed this while cloning the repo on a new machine.

Currently, {see}'s .git folder is 1.76 GB.
For a comparison, {ggplot2}'s .git folder is 700 MB.

I will do some research on this, but if anyone has ideas, let me know.

@IndrajeetPatil IndrajeetPatil added Enhancement 💥 New feature or request Help us 👀 Extra attention is needed labels Mar 23, 2022
@bwiernik
Copy link
Contributor

The issue here is probably lots of old versions of figures stored in the commit history. Running git gc might help, or we might need to do a more aggressive garbage collection to prune items or maybe truncate the commit history to some more recent commit

@strengejacke
Copy link
Member

How do we run a garbage collection? The folder is ~3GB meanwhile. If somebody familiar with cleaning, feel free to remove some older history items.

@DominiqueMakowski
Copy link
Member

I have some other repos which have huge .git folders too, mostly because of storing & modifying large data files. Is it possible to selective remove from memory all changes done to for e.g., .csv or .pngs etc?

@strengejacke
Copy link
Member

git gc --<date> should remove older files from the history, but I'm not sure how to run that command.

@DominiqueMakowski
Copy link
Member

DominiqueMakowski commented Mar 9, 2025

sounds dangerous to temper with the git history though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💥 New feature or request Help us 👀 Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants