-
Notifications
You must be signed in to change notification settings - Fork 5
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
Binary blobs in history #50
Comments
Hi @jsarenik, Thanks for your feedback, I agree maybe before the end of the milestone https://github.com/OpenLNMetrics/go-lnmetrics.reporter/milestone/1 I can clean the history. Thanks for this amazing feedback! |
I follow your step-by-step guide, and I'm happy to have feedback with the new config. Thanks @jsarenik |
@vincenzopalazzo I was doing a fresh clone to |
Ah, this is bad @jsarenik, I think I need to manage some corner cases in this case with git history, because I change the name of the repository, and back in the history there are some changes in the module. Do you have some idea on how to remove only the binary from history? maybe we can work together on this if you have time |
@vincenzopalazzo sure, let's work on it together. |
While the repository is so young, I would recommend rewriting the history and getting rid of the ~30MB blobs in there.
To find the blobs (and their filenames), save following script as
git-find-large.sh
:Now run it and grep for big (
MiB
) files:$ sh git-find-large.sh | grep MiB e18cca20fe54 2.9MiB go-lnmetrics 93d8fe172466 2.9MiB go-lnmetrics 96f8db4416d4 3.1MiB go-lnmetrics 085389b7d797 4.0MiB go-lnmetrics a08d2baee46a 4.0MiB go-lnmetrics 67fdfa256be6 4.0MiB go-lnmetrics 809698f74644 4.6MiB go-lnmetrics f42c5dcb17bb 4.6MiB go-lnmetrics c9260359fd64 4.6MiB go-lnmetrics ea783e785c3b 4.6MiB go-lnmetrics 8ab6dbfdca16 4.7MiB go-lnmetrics bb87c77ee906 4.7MiB go-lnmetrics de3b9e8d1a16 4.7MiB go-lnmetrics 152c6a8bb728 4.8MiB go-lnmetrics 39be3e928398 4.8MiB go-lnmetrics c6d0b5bd5755 4.8MiB go-lnmetrics eae5dd9b709b 4.8MiB go-lnmetrics 9a0f78a060b6 4.8MiB go-lnmetrics d4b142804efe 4.8MiB go-lnmetrics 7e82588f9d75 4.8MiB go-lnmetrics
Now to remove those from history (changing all the following commits), install [git-filter-repo] first and then do this:
You shall be then left out with rewritten history where your current latest commit c04afd1 becomes 0ad5f11 and the repository ends up to be 333 KiB big (instead of almost 30 MiB).
For a reference, see samhocevar/wincompose#16
The text was updated successfully, but these errors were encountered: