svn revert . -R
svn status | rm -rf $(awk '/^?/{$1 = ""; print $0}')
The -rf
may/should look scary at first, but once understood it will not be for these reasons:
rm
-rf
is required, else these directories will not be removedsvn revert . -R && svn status | rm -rf $(awk '/^?/{$1 = ""; print $0}')
Add permanent alias to your .bash_aliases
alias svn.HardReset='read -p "destroy all local changes?[y/N]" && [[ $REPLY =~ ^[yY] ]] && svn revert . -R && rm -rf $(awk -f <(echo "/^?/{print \$2}") <(svn status) ;)'