Clean Up a Repository
Open the Repository Settings page.
Go to the Statistics tab.
Press Force GC to execute the
git gc --agressivecommand.
This command will run a number of maintenance tasks that will clean up your repository by removing orphaned or inaccessible commits and compress file revisions to reduce disk space and increase performance.
When compared to
git gc which runs automatically with some other Git commands, the
--agressive option indicates a more in-depth optimization and should save more disk space. It also resultes in much more time required for
git gc to complete.
Since the effects of
git gc --agressive are persistent, it only needs to be run once in a while, after a significant number of changes has been made to the repository (several hundred changesets).