Skip to content

Instantly share code, notes, and snippets.

@strika
Created December 6, 2013 07:19
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save strika/7819851 to your computer and use it in GitHub Desktop.
Save strika/7819851 to your computer and use it in GitHub Desktop.
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