How commit all files except one with SVN
command, commit, file, svn
Solution
Option 1, AWK:
svn ci -m "Commit 1" `svn st | awk '{print $NF}' | grep -v file4`
svn ci -m "Commit 2" file4
Option 2, --targets:
svn ci -m "Commit 1" --targets filesToCommit.txt
svn ci -m "Commit 2" file4
Option 3, --changelist:
svn changelist my-changelist file1 file2 file3
svn ci -m "Commit 1" --changelist my-changelist
svn ci -m "Commit 2" file4
Problem
I want to commit all modified files except one using Subversion. So here is the scenario: ``` $ svn st M file1 M file2 M file3 M file4 ``` I can do something like this: ``` svn ci -m "Commit 1" file1 file2 file3 svn ci -m "Commit 2" file4 ``` But when a large number of files, I'm trying to simplify my work: ``` svn ci -m "Commit 1" `svn st | awk '{print $2}' | grep -v file4` svn ci -m "Commit 2" file4 ``` This solution is very fragile, because this scenario not works: ``` $ svn st M file1 M file2 D file3 A + file4 ``` I think that SVN does not have a built-in solution for my problem, but I'm not sure. Any other approach?