In the current project I am working in, someone decided that binary files be checked in as part of the source tree. The binaries live in a directory beneath the sources themselves:
project/src # Here is the location of the source code project/src/more_src # Some more source code lives here project/src/bin # Here are the binary files
As you can imagine, merge conflicts happen all the time because of this. It’s quite annoying since I do not feel that any developer’s machine should be committing the binaries – this should be left to the build server.
I am a command-line user of subversion. I would like to ignore the bin directory so that when I use svn st and svn ci these directories are skipped (even if there are pending changes).
Unfortunately, I cannot use -N (non-recursive) because of the more_src directory.
How can I accomplish this?
edit: subversion 1.6 has been released. From the release notes:
All the stuff below is obsolete now.
You could limit the depth of the folders in your working copy in the right places so that the undesired files don’t appear as versioned files.
You can’t reduce the depth in an existing working copy though.1) Checkout a clean working copy like this (it will contain only files and empty folders in the root):
2) Now for each folder that you DON’T want to ignore, pull in the content with
If the folder with content to ignore is not in the root of your working copy, you can work your way down the tree gradually with repeated calls to
This approach does have a disadvantage. If the files to ignore appear in your working copy through your own actions (e.g. build), they will show up in svn status as unversioned files. You can even svn add them and cause ‘file already exists’ commit errors.
edit: Apparently you CAN reduce the depth of parts of your working copy, which is much simpler:
Now you can do svn update of the entire project but the bad content will not return.