Skip to content

Instantly share code, notes, and snippets.

@fromkk
Last active January 12, 2023 01:20
Show Gist options
  • Save fromkk/4b6b3094af07676725da2461a510491f to your computer and use it in GitHub Desktop.
Save fromkk/4b6b3094af07676725da2461a510491f to your computer and use it in GitHub Desktop.
#!/bin/sh
git diff --name-only --diff-filter=d --cached "*.swift" | xargs -I {} swiftformat {}
git diff --name-only --diff-filter=d --cached | xargs -I {} git add {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment