JetBrains Space Help

Clean Up a Repository

  1. Open the Repository Settings page.

  2. Go to the Statistics tab.

  3. Press Force GC to execute the git gc --agressive command.

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).

Last modified: 02 November 2020