How can I delete all unversioned/ignored files/folders in my working copy?

前端 未结 12 1905
忘掉有多难
忘掉有多难 2020-11-28 19:06

If I have a working copy of a Subversion repository, is there a way to delete all unversioned or ignored files in that working copy with a single command or tool? Essential

12条回答
  •  独厮守ぢ
    2020-11-28 19:33

    This oneliner works for me (based on Richard Hansen's answer, which surprisingly didn't work for files containing spaces):

    svn status --no-ignore | grep '^[I?]' | cut -c 9- | xargs -d"\n" -I{} rm {}
    

提交回复
热议问题