.svnignore is my attempt to create the equivalent of .gitignore. After creating the file I had to set the svn:ignore property before it worked: svn propset svn:ignore -F .svnignore .

First, a little background: my PhD work uses Sun (Oracle) SPOT devices that run the Java Squawk VM (kinda like Java ME). For version control, we use Subversion. In keeping with good version control practices, I want to avoid putting binary and compiled files into version control. The easiest way to do this is a solid .svnignore file. I spent a few minutes trying to find a .svnignore example for Java and could not find anything, so I built one myself based on several examples I saw.

.svnignore

    *.class
    build/*
    j2meclasses/*
    .classpath
    .project
    .settings
    *.war
    *~
    *.lock
    *.DS_Store
    *.swp
    *.out
    *.bak
    *.tmp
    *.log
    log*.txt
    .idea
    .git

From the top, ignore class files, the build directory, the classes directory, our local classpath/project/settings, the compiled deployment package (WAR/JAR), any tilde backup files, a OS X specific directory,  VI files that are being edited, log files, backup and temporary files, IDE files (thanks Lane), and finally any git files (this part could be expanded to include other version control systems like Bazaar or Mercurial).

If I missed something, please let me know.

UPDATE

GitHub has published a list of .gitignore files for a number of languages: https://github.com/github/gitignore. You can pop these into your .svnignore and apply the properties.