Skip to content

Instantly share code, notes, and snippets.

@arielallon
Last active August 29, 2015 14:03
Show Gist options
  • Save arielallon/7f73308668a27b6f775d to your computer and use it in GitHub Desktop.
Save arielallon/7f73308668a27b6f775d to your computer and use it in GitHub Desktop.
SVN add (and rm) all new files (e.g. from a merge)
svn status | grep "^\?" | awk '{print $2}' | xargs svn add;
svn status | grep "^\!" | awk '{print $2}' | xargs svn rm;
# tars up the files/dirs that are not in svn so you can rm the svn'd dir and then untar them back in
svn status | grep "^\?" | awk '{print $2}' | tar cvzf ../notsvn.tar.gz -T -
@rhift
Copy link

rhift commented Jun 28, 2014

do you have something that auto generates the diff and applies it? that would be awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment