How do I get a list of all unversioned files from SVN?

后端 未结 5 783
别那么骄傲
别那么骄傲 2020-11-30 20:38

Sometimes you\'re developing and you decide to commit, forgetting you created a few files on your project. Then a few days down the line your buddy gets your build out of Su

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 21:00

    If you're running on Windows, you could do something similar to Greg Hewgill's answer using PowerShell.

    (svn stat) -match '^\?'
    

    This could be extended pretty easily to find all unversioned and ignored files and delete them.

    (svn stat "--no-ignore") -match '^[I?]' -replace '^.\s+','' | rm
    

    Hope that's helpful to someone!

提交回复
热议问题