Commit all modified/added files via the command line with Subversion excluding a provided black list

commit, svn, unix, version-control

Solution

There is no option to ignore files on-the-fly on commit. However, there are two approaches you can take:

Use the changelists feature. This can help you create filters for the files that you do want to commit and only commit those. As changelists are created on the developer machine, your filters won't impact the general repository. For example, you can add all the files to a changelist using:

`svn changelist to-commit *`

And then remove those that you want to ignore:

`svn changelist --remove /path/to/file1.php`

Only `svn add` the files that you are working on, one by one as soon as you start editing one. Any file that has not been `svn add`ed to the repository will be ignored on commit. Of course, this comes with the disadvantage that you will be the only developer that will have those files on his machine.

Problem

I am investigating a way to commit all modified/added files via the command line with Subversion, excluding a provided black list. Is this possible? If I have, say, 100 files I would like to commit, but interspersed with that list are seven files that I don't want to commit. Is there a way to say "commit all files excluding /path/to/file1.php, /path/to/file2.php, /path/to/file3.php", etc.... For example, I would have to do something like: ``` svn ci [list all files to commit in here] -m 'my commit message' ``` However, is there a better way to do it? I can't find anything documented regarding it.

Original source