First before we can start, we need to get the tool. The git-sizer tool can be found here and it is really easy to install.
NOTE:
Make sure you have the Git CLI installed (version >= 2.6)
Also makse sure that git command is available in your PATH
Install git-sizer on Windows
Install a released version of git-sizer(recommended):
Go to the releases page and download the ZIP file corresponding to your platform.
Unzip the file.
Move the executable file (git-sizer or git-sizer.exe) into your PATH.
NOTE: The easiest is to copy the excutable to the same path were git is installed, as that is already part of your PATH
Pro Tip: If git-sizer is part of your PATH, you can run it by either typing git-sizer or git sizer. In latter case, it is found and run for you by Git, and you can add extra Git options between the two words
How to use git-sizer
To get detailed information about the size of a git repository, you can use the git-sizer --verbose command. By default using git-sizer it will only show problematic areas.
The output is a table showing what was measureed and a rough indiction of which values might be problematic.
Note: Only objects that are reachable from references are included.
The “Overall repository size” section includes repository-wide statistics about distinct objects, not including repetition. “Total size” is the sum of the sizes of the corresponding objects in their uncompressed form, measured in bytes. The overall uncompressed size of all objects is a good indication of how expensive commands like git gc --aggressive (and git repack [-f|-F] and git pack-objects --no-reuse-delta), git fsck, and git log [-G
-S] will be. The uncompressed size of trees and commits is a good indication of how expensive reachability traversals will be, including clones and fetches and git gc.
This is the default output using one of the famouse “git bomb” repositoriy repositories: