Is there a Subversion command to reset the working copy?

前端 未结 9 1660
时光说笑
时光说笑 2020-12-23 02:25

Is there a single Subversion command that would “reset” a working copy exactly to the state that’s stored in the repository? Something like git reset --hard or

9条回答
  •  渐次进展
    2020-12-23 03:17

    Delete everything inside your local copy using:

    rm -r your_local_svn_dir_path/*
    

    And the revert everything recursively using the below command.

    svn revert -R your_local_svn_dir_path
    

    This is way faster than deleting the entire directory and then taking a fresh checkout, because the files are being restored from you local SVN meta data. It doesn't even need a network connection.

提交回复
热议问题