Git Clients

BFG Repo-Cleaner – remove unwanted data from Git history

BFG Repo-Cleaner specialises in removing unwanted material from the history of a Git repository. Common reasons to use it include oversized committed files, accidentally committed passwords and confidential data that should never have entered a shared project.

The program is oriented towards bulk cleanup rather than arbitrary transformations of every historical commit. Because modifying history changes commit identifiers, collaborators still need to coordinate the replacement of any shared history after cleaning.

Deleting a secret from the latest working tree does not erase copies stored in earlier Git objects. This is why historical cleaning and coordination with other holders of the repository are separate tasks. BFG focuses on the object-cleaning part rather than ordinary source-file editing.

This is free and open source software.

Key Features

  • Removes large blobs from historical commits, helping eliminate unwanted binary content from a repository.
  • Deletes files and folders whose names match specified patterns, including historical copies no longer present in the working tree.
  • Replaces sensitive text found inside committed files using user-supplied substitution patterns.
  • Protects objects referenced by the latest commit by default, reducing the chance of unexpectedly changing the current project snapshot.
  • Can target specific blob identifiers when the unwanted object is known precisely.
  • Provides filters based on file sizes or file contents to restrict cleaning to relevant historical objects.
  • Updates references and commits in a mirror-clone cleanup workflow before normal Git maintenance removes unreachable objects.
  • Processes Git objects efficiently and can take advantage of multiple processor cores during substantial cleanup jobs.

Website: github.com/rtyley/bfg-repo-cleaner
Support:
Developer: Roberto Tyley
License: GNU General Public License v3.0

bfg usage

BFG Repo-Cleaner is written in Scala. Learn Scala with our recommended free books and free tutorials.


Related Software

Git Tools for Diff Review and Repository History
difftasticStructural diff tool that compares files based on their syntax
git-filter-repoQuickly rewrite git repository history
onefetchDisplays information about a local Git repository
git-statsLocal git statistics including GitHub-like contributions calendars
diff-so-fancyAttractive diffs with diff-highlight and more
BFG Repo-CleanerClean unwanted data from Git repository history
git-deltaViewer for git and diff output
gitlogueCinematic Git commit replay tool
git-quick-statsAccess various statistics in a git repository
git-whoCommand-line Git analysis tool
git-standupRecall what you did on the last working day
git-of-theseusAnalyze how a Git repo grows over time
git-sizerCompute various size metrics for a git repository
diffnavGit diff pager based on delta but with a file tree, à la GitHub
critiqueTerminal UI for reviewing git diffs
git-big-pictureVisualization tool for Git repositories
herculesGain advanced insights from Git repository history
keifuTUI that visualizes Git commit graphs
git-fameGit repository collaborators sorted by contributions
needleHighlights GitHub PRs
mergirafGit merge driver
git-historyAnalyze Git history using SQLite
ecTerminal Git mergetool
diffrWord-by-word diff highlighting utility
git-scopeFast TUI dashboard to view the git status of all your repositories
mamediffManages unstaged and staged Git diffs
deadbranchKeep Git repositories tidy
GitTopLightweight desktop client for GitHub notifications
git-heatmapGenerates a customizable heatmap

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted