I have a GitHub repository that had two branches - master and release.
The release branch contained binary distribution files that were contributing to a very large repository size (more than 250?MB), so I decided to clean things up.
First I deleted the remote release branch, via git push origin :release
.
Then I deleted the local release branch. First I tried git branch -d release
, but Git said "error: The branch 'release' is not an ancestor of your current HEAD." which is true, so then I did git branch -D release
to force it to be deleted.
But my repository size, both locally and on GitHub, was still huge. So then I ran through the usual list of Git commands, like git gc --prune=today --aggressive
, without any luck.
By following Charles Bailey's instructions at SO 1029969 I was able to get a list of SHA-1 hashes for the biggest blobs. I then used the script from SO 460331 to find the blobs...and the five biggest don't exist, though smaller blobs are found, so I know the script is working.
I think these blogs are the binaries from the release branch, and they somehow got left around after the delete of that branch. What's the right way to get rid of them?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…