rsync IDE project files

The jury is still out on whether to version control the IDE files (see for example this question on StackOverflow). I recently tend to agree with Anton and lend towards not version-controlling or at least keeping them separate.

This little rsync script can help moving all project files to a separate hierarchy so that you can manage them separately from your source tree:

rsync -av \
–filter=’+ */’ \
–filter=’+ .classpath’ \
–filter=’+ .project’ \
–filter=’+ **/*.iml’ \
–filter=’+ .idea/***’ \
–filter=’- *’ \
–prune-empty-dirs $1 $2

Thanks Shane Meyers for the insight into rsync filter patterns.