Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to SVN Commit all files, except one, using command-line only?

In my project, there are 25 modified files. I need to commit 24 of those files to the SVN Repository. The one single file that I do not want to commit is not complete yet, so I will commit it at a later date.

I'm using a remote shell on a Linux Server to do SVN commits. The only way I know how to do the above is to type:

# svn ci file1 file2 file3 file4........... file24

It's kind of ridiculous and inefficient. Is there an easier alternative to this? Can I commit everything but choose to leave out certain files?

Is some fancy bash script needed for this?

like image 537
Jake Wilson Avatar asked May 24 '26 10:05

Jake Wilson


1 Answers

If you need it in a single transaction try something like this:

svn commit `svn status | sed -n -e '/file_you_dont_want/!s/^.......//p'`
like image 94
Bartosz Moczulski Avatar answered May 26 '26 14:05

Bartosz Moczulski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!