Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Last active August 29, 2015 14:05
Show Gist options
  • Save niraj-shah/ab67d9e463e5237c0b36 to your computer and use it in GitHub Desktop.
Save niraj-shah/ab67d9e463e5237c0b36 to your computer and use it in GitHub Desktop.
Find and delete .svn / .git subdirectories in a given folder
# === SVN === #
# find .svn folders in current directory
find . -name .svn -exec echo {} \;
# delete .svn folders in current directory
find . -name .svn -exec rm -rfv {} \;
# === GIT === #
# find .git folders in current directory
find . -name .git -exec echo {} \;
# delete .git folders in current directory
find . -name .git -exec rm -rfv {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment