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

Make repo size lower #3591

Open
belgattitude opened this issue Mar 30, 2023 · 1 comment
Open

Make repo size lower #3591

belgattitude opened this issue Mar 30, 2023 · 1 comment

Comments

@belgattitude
Copy link
Owner

belgattitude commented Mar 30, 2023

Size starts to become big... Would like to remove some obsolete history, hope it does not break possible forks/clones...

Possible:

git clone https://github.com/belgattitude/nextjs-monorepo-example.git
cd nextjs-monorepo-example

git filter-repo --invert-paths --path .yarn --path apps/web-app --path apps/blog-app --path packages/bar --path packages/foo

git filter-repo --invert-paths --use-base-name --path-glob '*water*.png' --path-glob '*water*.jpg' 

-> du -h .git -> 260Mb to 53Mb

Optionnally all lock files

git filter-repo --invert-paths --path yarn.lock

To make it down to 13Mb

Then

git remote add origin https://github.com/belgattitude/nextjs-monorepo-example.git
git push origin --force --all

I'll investigate a bit

https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository

@belgattitude
Copy link
Owner Author

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

1 participant