# newren/git-filter-repo

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/newren-git-filter-repo).**

11,748 stars · 923 forks · Python · other

## Links

- GitHub: https://github.com/newren/git-filter-repo
- awesome-repositories: https://awesome-repositories.com/repository/newren-git-filter-repo.md

## Description

Git-filter-repo is a command-line utility designed for the permanent modification and restructuring of Git repository history. It functions as a maintenance tool for cleaning project data, enabling users to reorganize file structures, update commit metadata, and purge sensitive information such as credentials or large blobs from the entire commit graph.

The tool distinguishes itself by interacting directly with the internal Git object database rather than relying on standard command-line interfaces. It utilizes the native fast-import stream protocol and processes commits as a continuous data stream, which allows for efficient in-memory tree transformations and rapid history rewriting even in large repositories.

This utility supports comprehensive version control refactoring, facilitating the migration of legacy projects or the splitting of repositories into smaller components. It provides a systematic approach to maintaining repository security and size by ensuring that historical changes are applied consistently across all commits. The software is distributed as a Python script and is intended for use in automated repository maintenance workflows.

## Tags

### Development Tools & Productivity

- [History Rewriting](https://awesome-repositories.com/f/development-tools-productivity/history-rewriting.md) — Permanently removes sensitive data, reorganizes file structures, and updates commit metadata across entire project histories. ([source](https://github.com/newren/git-filter-repo/tree/main/Documentation/))
- [Git Utilities](https://awesome-repositories.com/f/development-tools-productivity/version-control-repository-tools/version-control-managers/git-utilities.md) — Provides a specialized utility for restructuring and cleaning Git repositories during migrations or project splitting.
- [Git History Cleaners](https://awesome-repositories.com/f/development-tools-productivity/version-control-repository-tools/version-control-managers/repository-utilities/history-manipulation-tools/git-history-cleaners.md) — Offers a command-line tool for permanently modifying or removing files, directories, and commit metadata from repository history.
- [Version Control Utilities](https://awesome-repositories.com/f/development-tools-productivity/version-control-utilities.md) — Optimizes Git repository size and security by purging sensitive data and large blobs from the commit history.
- [Git Workflows](https://awesome-repositories.com/f/development-tools-productivity/git-workflows.md) — Facilitates the restructuring and cleaning of legacy repositories during complex migration and merging workflows.
- [Version Control and Repository Tools](https://awesome-repositories.com/f/development-tools-productivity/version-control-repository-tools.md) — Modifies commit logs and file structures across entire projects to reorganize code and fix historical mistakes.
- [In-Memory Transformation Engines](https://awesome-repositories.com/f/development-tools-productivity/in-memory-transformation-engines.md) — Performs rapid repository tree transformations entirely in memory to optimize history rewriting performance.
- [Metadata Rewriters](https://awesome-repositories.com/f/development-tools-productivity/history-rewriting/metadata-rewriters.md) — Updates commit headers and author information by parsing and re-encoding raw commit objects during the migration process.

### Software Engineering & Architecture

- [Repository Maintenance](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/repository-maintenance.md) — Cleans up large or sensitive files from project history to reduce repository size and improve security.

### Security & Cryptography

- [Credential Remediation Workflows](https://awesome-repositories.com/f/security-cryptography/credential-remediation-workflows.md) — Permanently purges passwords, API keys, and private credentials from every commit in a repository history.

### Networking & Communication

- [Fast-Import Protocols](https://awesome-repositories.com/f/networking-communication/streaming-data-protocols/fast-import-protocols.md) — Utilizes the native fast-import stream protocol to efficiently pipe transformed repository objects into a new commit graph.

### Data & Databases

- [Git Object Backends](https://awesome-repositories.com/f/data-databases/object-oriented-databases/git-object-backends.md) — Interacts directly with the internal Git object database to perform repository history modifications.
