I have a git repository that when checked out occupies 63GB worth of disk space. As this leads to several practical problems when dealing with git, I want to analyse the repository in a way that allows me to see what commits/ trees/ blobs have caused this size increase.
Ideally, I'd like to see
- the repo size (on disk) after each (or every x-th) commit
- the total size of a file/ directory in the repository, where "total size" refers to the size git needs to store all versions of this file/ directory
- an option to efficiently remove unnecessary chunks of data from the repository. This is more of a bonus as I know about
git filter-branchbut this command takes a long time on a repository this size.
I know about BFG Repo-Cleaner. It allows me to remove files greater a given threshold which resulted in some insight but does not solve the problem.
I have also run git-sizer on the repo but this only shows information on the current state and I cannot see how to decrease the size based on this.
Some context about the git repository: it is the result of an SVN-to-git migration using subgit. We already tried optimizing the migration process with subgit by pruning less relevant branches and directories but for any further steps we need more insight in the structure of the git repo.