HOWTO: Ignore Files and Directories in Subversion (SVN)

| No TrackBacks
Subversion is fun.  Especially when it tries to commit intermediate build files and other junk you want to keep out of your SVN repository.  In my environment, Ant is configured to place intermediate build files into my build/ directory.  The final product is then packaged up and placed into my dist/ directory.  So, I need SVN to ignore everything inside of my build/ directory since the contents of this folder are going to change on every build.

Meet svn propedit svn:ignore ...

#/> svn propedit svn:ignore build
#/> svn -m "ignoring build" commit build

When you run svn propedit, your local text editor will open (usually vi) which will allow you to specify a series of file names to ignore under build/.  If you want to ignore all files and folders, just enter a single * wildcard character, save, and commit:

*

Or, maybe you want to ignore just .class files:

*.class

Of course, if you want to use another editor like emacs to set your ignore properties, you can do so by exporting SVN_EDITOR before running svn propedit:

#/> export SVN_EDITOR=emacs

Enjoy!

Did You Find this Helpful?

Did you find this post helpful, or at least, interesting?

  

About Mark

A Silicon Valley native, Mark Kolich is a full-time Software Engineer and a consultant for hire. A web technologies expert, his current focus is on building powerful and robust cloud-driven web-applications using Java, PHP, Perl, AJAX, DHTML, CSS, and JavaScript. His favorite programming languages are PHP, Java and JavaScript. He uses Linux, enjoys biking to work, loves building great software, and always writes elegant, readable, and maintainable code.

No TrackBacks

No trackbacks attached to this entry.

Twitter (@markkolich)

Translate

About this Entry

This page contains a single entry by Mark Kolich published on April 8, 2010 9:21 AM.

HOWTO: Scheduling Cron Style Timers and Jobs with Spring and Quartz was the previous entry in this blog.

Understanding Java's CountDownLatch and CyclicBarrier is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.