Skip to content

Instantly share code, notes, and snippets.

@luisfaceira
Created September 15, 2011 10:52
Show Gist options
  • Save luisfaceira/1218997 to your computer and use it in GitHub Desktop.
Save luisfaceira/1218997 to your computer and use it in GitHub Desktop.
Oneliner to prepare empty directories for svn2git conversion
find -not -path "*/.svn/*" -type d -empty -exec sh -c "echo This directory was empty. This file let's it be git-compatible. > {}/README.emptydir" \;
@luisfaceira
Copy link
Author

In svn there actually exists no empty dir since every single on has the hidden ".svn" folder, so this way of searching them won't work on a checked out repo, just on an export.

This means there are some adaptations needed.

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