git-filter-repo
git-filter-repo
rewrite git history: remove files, rename paths, rewrite authors
curl -fsSL https://unflab.app/get | sh -s -- git-filter-repo
Installs to ~/.local/bin. Add --prefix /usr/local/bin to
put it somewhere else, or --uninstall to remove it.
Why it’s here
Escapes a dependency tree: Homebrew’s build pulls in libraries this tool never touches at run time.
Details
| Original package | git-filter-repo |
| Version | 2.47.0 |
| Licence | MIT |
| Upstream | https://github.com/newren/git-filter-repo |
| Source | git-filter-repo-2.47.0.tar.xz |
| Version check | git-filter-repo --version |
| Download | git-filter-repo-2.47.0.macos-arm64.tgz |
Built from that exact tarball, with its SHA-256 pinned in the
recipe. The binary links against nothing outside /usr/lib
and /System/, checked in CI before release.
git-filter-repo rewrites git history quickly: removing files or
directories from every commit, renaming paths, rewriting author and
committer identities, and more. It is the tool the git project itself
recommends in place of git filter-branch.
This is a standalone package for macOS: one Python script and its man
page. It needs python3 3.6 or later. The one in /usr/bin comes with
the Command Line Tools, the same install that provides git, so a Mac
that runs git already has it. Nothing else is installed.
Once it is on your PATH, git picks it up as a subcommand:
git filter-repo --invert-paths --path secrets.env
Limitations
--versionprints an upstream commit id (for examplea40bce548d2c),
not2.47.0. That is upstream’s behaviour.- It runs on whichever
python3comes first on yourPATH, which is
/usr/bin/python3unless you have installed another. - The library module
git_filter_repo.pyand thecontrib/demo
scripts are not shipped.
Install
./install.sh # into ~/.local/bin
./install.sh --prefix /usr/local/bin
./install.sh --uninstall
Run ./install.sh --help for the full set of options.
If ~/.local/bin isn’t on your PATH, the installer says so and offers
to add it — it won’t edit your shell config without asking.
Upstream
- Home: https://github.com/newren/git-filter-repo
- Source: https://github.com/newren/git-filter-repo
- Version: 2.47.0
- Licence: MIT (see
COPYINGandCOPYING.mit)
git-filter-repo is Elijah Newren’s work, not this project’s. unflab
only packages it. The exact source tarball and its checksum are recorded
in the recipe this package was built from.