Skip to content

Instantly share code, notes, and snippets.

@radutopala
Last active December 26, 2015 10:19
Show Gist options
  • Save radutopala/7135514 to your computer and use it in GitHub Desktop.
Save radutopala/7135514 to your computer and use it in GitHub Desktop.
Clean svn dirs from a git repo
#!/bin/bash
find . -name .svn -print0 | xargs -0 rm -r
paths=`git ls-files --deleted`
for path in $paths
do
echo ${path} to be removed
git rm -r $path
done
@radutopala
Copy link
Author

Execute with:

wget https://gist.github.com/radutopala/7135514/raw/0a80e3b11821ec008a110c13c725aa08e67e6e53/cleanup_git_svn.sh && bash cleanup_git_svn.sh && rm -f cleanup_git_svn.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment