Skip to content

Instantly share code, notes, and snippets.

@kavon
Created November 30, 2014 20:04
Show Gist options
  • Save kavon/e29e8bb36ecb0e6cc2fa to your computer and use it in GitHub Desktop.
Save kavon/e29e8bb36ecb0e6cc2fa to your computer and use it in GitHub Desktop.
Remove untracked files and directories in SVN
#!/bin/bash
# assumes paths have no spaces :)
svn status | egrep '^\?' | cut -c8- | xargs rm 2>&1 >/dev/null | sed 's/^rm: *\([^ ][^ ]*\): *is a directory$/\1/g' | xargs rm -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment