Subversion bulk add or remove

A couple of one liners to easily bulk add or remove files in subversion:


svn st | grep ^? | sed 's/?    //' | xargs svn add

svn st | grep ^! | sed 's/?    //' | xargs svn rm

svn st | grep ^! | sed 's/!    //' | xargs svn rm

They can even handle files with spaces.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

2 Responses to “Subversion bulk add or remove”

  1. Daniel Phillips says:

    Thanks for this, was very very handy

  2. Casimir says:

    No problem. The bulk add and bulk remove should work for most cases, but their are some random edge cases where they trip up on files with lots of spaces. I have not been able to track down why, but when I do, I will update the snippets.

Leave a Reply