]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/git-obliterate
.vimrc: spelllang=en_us
[dotfiles.git] / bin / git-obliterate
1 #!/bin/sh
2 # Usage: git-obliterate <file>
3 # Rewrite repo history to completely remove all traces of a given file/directory.
4
5 file=$1
6 test -z $file && echo "file required." 1>&2 && exit 1
7 git filter-branch -f --index-filter "git rm -r --cached $file --ignore-unmatch" --prune-empty --tag-name-filter cat -- --all