Skip to content

Instantly share code, notes, and snippets.

@lucenarenato
Forked from vluzrmos/git_filter_branch.sh
Created August 20, 2021 13:08
Show Gist options
  • Select an option

  • Save lucenarenato/26c17c0604e2314717635be2600fe0e8 to your computer and use it in GitHub Desktop.

Select an option

Save lucenarenato/26c17c0604e2314717635be2600fe0e8 to your computer and use it in GitHub Desktop.
Remove file from all commits on all branches
# Remove file from all commits on all branches
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch FILENAMEHERE" --prune-empty --tag-name-filter cat -- --all
# After
git push --all --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment