Skip to content

Instantly share code, notes, and snippets.

@davidarias
davidarias / git-destroy
Created March 11, 2017 14:54
Uses git filter-branch to eliminate a file from the history and from all branches of the git repository
#!/bin/bash
git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch $1" \
--prune-empty --tag-name-filter cat -- --all