Skip to content

Instantly share code, notes, and snippets.

@Maecenas
Created May 10, 2018 10:52
Show Gist options
  • Save Maecenas/4a462c1103191612d86c929ef4e74962 to your computer and use it in GitHub Desktop.
Save Maecenas/4a462c1103191612d86c929ef4e74962 to your computer and use it in GitHub Desktop.
Remove .DS_Store from Git commit history
git filter-branch -f --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch /.DS_Store' --tag-name-filter cat -- --all

find . -name ".DS_Store" -print0 | xargs -0 rm -rf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment