I've got a git checkout that is 3.2 GB in size, including the .git dir. There is a subfolder in this repo that I'd like to split out into a new git repo. So I followed the instructions here: https://help.github.com/articles/splitting-a-subfolder-out-into-a-new-repository/
So far, so good. However, the new repo (including .git dir) is still 2 GB, but the checked out files are only 22MB and there are only 164 commits in the log on the main branch. I've tried a couple of things like git reflog expire --expire=now --all
and git gc --aggressive
and git prune --now
.
I still see a lot of branches that I'd like to purge.
What can I do to ensure none of the removed code is in this repo?
More info:
git st
shows:
# Your branch and 'origin/master' have diverged,
# and have 164 and 101729 different commits each, respectively.
# (use "git pull" to merge the remote branch into yours)
So it looks like the history still has all of those commits.