Telling SVN to ignore files and directories is crucial to keeping your repository clean, and to prevent it from needlessly bloating. It’s rather simple to tell SVN what you want it to ignore with svn propset/propedit svn:ignore.
If you want SVN to ignore all files in a directory, you’d simply enter the following command:
svn propset svn:ignore * /path/to/directory
Often times, you only want SVN to ignore a specific type of file, say .jpg uploads in your user profile pictures directory:
svn propset svn:ignore *.jpg /path/to/directory
As you can see, it’s easy to tell SVN what to ignore with propset svn:ignore, but what if you want to know what you or someone else has told SVN to ignore? It’s simply:
svn propget svn:ignore /path/to/directory
Often times, you will want to edit what you’ve already told SVN to ignore. This can be achieved with svn propedit svn:ignore.
svn propedit svn:ignore /path/to/directory
This will allow you to edit your svn:ignore property in your default text editor. Multiple ignores can be added one per line. You can even run this command to setup the initial svn:ignore rather than using svn propset svn:ignore. I much prefer this method because it’s cleaner, and I don’t have to remember the syntax for the command line.