I edited some files in svn, like this:
$svn st
M a
M b
...
Now, I want to commit my changes to svn, for some reason, I don't want to commit file b
, is there any quick way or command to ignore the modified file b
?
Finally, I use @yzucker Solution 1, cp, revert and commit. Changelists is too heavy, thank you all.
Use the following command to create a list not under version control files. Then edit the file to leave just the files you want actually to ignore. Then use this one to ignore the files listed in the file: svn propset svn:ignore -F ignoring.
To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…
You can use the Changelist Feature of newer Subverion clients as shown in this short example session:
$ svn st
M a
M b
$ svn cl task1 a
$ svn cl task2 b
$ svn st
--- Changelist 'task1':
M a
--- Changelist 'task2':
M b
$ svn ci --cl task1 -m "checking in only task 1 stuff"
Sending a
Committed revision 11.
Alas, the commit many files with some annoying changes ignored problem.
Solution 1: copy, revert and commit
$cp b /tmp/
$svn revert b
$svn commit -m 'commit message'
$mv /tmp/b ./
Solution 2: copy, commit, reverse the effect of b, recommit b
$cp b /tmp/
$svn commit -m 'commit message'
$svn merge -c -{new revision} b
$svn commit b -m 'revert message for b'
$cp /tmp/b ./b
The second approach is less preferable since you introduce broken code in svn.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With