Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

16
  • 16
    Nice tool! Works well on Ubuntu 20.04, you can just pip3 install git-filter-repo since it's stdlib-only and doesn't install any dependencies. On Ubuntu 18 it's incompatible with distro's git version Error: need a version of git whose diff-tree command has the --combined-all-paths option, but it's easy to enough to run it on a docker run -ti ubuntu:20.04 Commented May 27, 2020 at 9:29
  • 3
    git: 'filter-repo' is not a git command. See 'git --help'. Commented May 27, 2021 at 16:17
  • 5
    Thanks for this, this was fast and finished in seconds! A couple notes on usage: 1) you may need to install a newer version of git. If you're on ubuntu that may require setting up a new apt repository as i.e. Xenial repos are still on git 2.7.4 which is too old. 2) This DOES delete the folder locally as well. Back it up if you need it. 3) You'll need to re-add the remote url and do a force push (as always, carefully!). 4) You can install the tool with pip3 easily (mentioned above). 5) You may need to run with --force if you don't want to clone a fresh repo. Seems to have gone fine for me. Commented Jun 29, 2021 at 3:49
  • 3
    The example should read git-filter-repo.py, not git filter-repo. It is not a native Git command. Commented Jul 2, 2021 at 4:19
  • 7
    On OS X, has Homebrew link support. brew install git-filter-repo Commented Feb 3, 2023 at 4:47