Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bash script for removing all PSD files from a repo history.
#!/bin/bash
set -o errexit
git filter-branch --tree-filter "git rm -r -f --ignore-unmatch *.psd" HEAD
rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.