Search code examples
svncommand-linerestoreundelete

How to resurrect non-committed directory and files?


I managed to delete a folder from my working directory with command

svn delete MYDIR

I realized that the directory I deleted was a wrong one and I need to get it back. I can see the directory and all the subdirectories on my harddrive, but there are no files. If I check the status

svn status MYDIR

it shows all the files having the "D" mark before them. I haven't committed the changes yet, so is there a way to get those files back?


Solution

  • You can use

    svn revert -R MYDIR
    

    The -R is needed if there were any files previously in MYDIR as your delete command would have also tagged them as deleted.