Closed maelh closed 3 years ago
To remove the .metadata folders, that were crowding the repository, I executed these commands:
bfg.bat:
@java -jar d:\amzi\bfg.jar %*
commands:
bfg --delete-folders .metadata AmziProlog.git
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push
The original repository size of 161MB was reduced to 16,8 MB.
Pushing to GitHub caused this error:
To https://github.com/AmziLS/AmziProlog
+ 9ccc141...eb4603f master -> master (forced update)
+ 62d6cf5...8a3743e release_11.0 -> release_11.0 (forced update)
! [remote rejected] refs/pull/3/head -> refs/pull/3/head (deny updating a hidden ref)
error: failed to push some refs to 'https://github.com/AmziLS/AmziProlog'
GitHub denies updating some references, and would need to contact the support to fix this: https://stackoverflow.com/questions/50343697/cleaning-git-repository-bfg-repo-cleaner-repo-size-is-still-large-after-i-pu
A freshly cloned repository seems to be fine, size-wise, so I suppose this is enough.
Merging the eclipse-plugin pulled in a lot of binary data that I deleted, but stays in the history, such that it has a size of about 200MB now.
Use something like this to fix it: https://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository?noredirect=1&lq=1 https://rtyley.github.io/bfg-repo-cleaner/