Skip to content
You are here:

Reduce Repository Size

Git repositories become larger over time. When large files are added to a Git repository:

  • Fetching the repository becomes slower because everyone must download the files.
  • They take up a large amount of storage space on the server.
  • Git repository storage limits can be reached.

Rewriting a repository can remove unwanted history to make the repository smaller. We recommend git filter-repo over git filter-branch and BFG.

Rewriting repository history is a destructive operation. Make sure to back up your repository before you begin. The best way back up a repository is to export the project.