-
Notifications
You must be signed in to change notification settings - Fork 32
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
Strip old tarballs from git history #25
Comments
In favour! Ping me if I don't get to this in a few days. |
Done. One minor correction was that '10m' rather than '10MB' is the size designator. But something didn't work, see the log -- or is this expected?
The remote has received changes, a new checkout is now at 142mb -- as opposed to 660mb. |
That plainly didn't work. On another machine (the laptop) I updated and am now at 460mb instead of 445mb before, and got four warnings about files over 50mb. Which of course are no longer visible either. Fiddlesticks. It is also messing with my history. What were three commits to bh on Sunday become six, and now nine. And it messed with the git log. In 'graph mode' I now have an entire new 'line'. |
Oh for fsck's sake. And GH now shows 288 commits instead of 144. That. Was. Not. A. Good. Idea. |
I had left my main repo checkout untouched / unchanged. I just pushed a backup copy to GitLib just to be safe -- 144 commits, 305mb. As it should be. Whereas this one is now busted at 288 commits. Advice? If I nuke this at GH and re-create I loose issues and PRs. |
I think you need to re-clone the repo on other machines you can't just |
I don;t understand sentence. If the old one was (is) The latter has I would love to undo the 'wrong' 166 ones at the merge. Sadly THIS REPO now has all 335. How do I get rid of them without loosing history, issues, ... and other metadata I'd loose by deleting the whole repo? |
Add a new commit to the head of the clean repo and |
That seems to have done it! Thanks @jimhester and @gaborcsardi. I'll close this issue now. I added a workaround to the README.md. Jim was actually the first person foolish^Hbrave enough to do a full PR -- everybody else who wanted a new Boost library just filed an issue. So I leave the monster size for now. |
I guess you can try to get rid of the large files in the history in another branch, then you don't mess with master. If it will be successful this time, then you can just rename branches. This might mess up open PRs, but the rest should be OK I think. |
I am still open to doing this but having been burned twice by such git filtering approaches, I would need a simpler / better / more reliable "script" to follow. The goal is to keep this repo with issue ticket history, but filter master. I do not know how to do that. I seem to be able to filter a repo and push it somewhere else with an altered history, but that is not the goal. |
I am not sure what you mean by 'history'. The commit hashes will change. There is simply no way of keeping them. But this is fine, imo. You can keep the branch as Forks and pull requests need to rebase or maybe even re-fork. I'll give it a try, once I get to a better internet connection, I am on (slow) public wifi today. |
'history' was a sloppy term. "Preserve as much as I can" from the existing repo -- as opposed to starting over with a fresh one with filtered code. That includes the history and sequence of commits, but then under different sha1 ids. Maybe the branch switch is the element I was missing. But force pushing back into master I ended up with everything double. |
No force pushing. Put the filtered repo in a new branch and then rename
|
Issue #34 with this contributed script did the trick. Many thanks to @Enchufa2 for providing it. |
You're welcome. :-) |
The old tarballs have been removed from the working tree but are still present in the history. They make the repo size much larger than it needs to be, as the tarballs can be downloaded from boost directly.
Stripping them from the history take the bare repo size (e.g.
git clone --mirror
) from ~350 MB to 16MB on my machine. This will make cloning this repo much faster!You can do so by downloading the BFG repo cleaner and running the following commands.
The text was updated successfully, but these errors were encountered: