Skip to content

Instantly share code, notes, and snippets.

@swooningfish
Created February 5, 2026 22:35
Show Gist options
  • Select an option

  • Save swooningfish/40c471f0c32db8be8d6a093ca0f28c6a to your computer and use it in GitHub Desktop.

Select an option

Save swooningfish/40c471f0c32db8be8d6a093ca0f28c6a to your computer and use it in GitHub Desktop.
git filter repo

Git filter repo

Install

pip install git-filter-repo

Remove files

git filter-repo --invert-paths --path "database/large-file.sql"

Rewrite author email

git filter-repo --use-mailmap --force

.mailmap

<newemail@example.com> <oldemail@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment