Search code examples
svnversioningundelete

undelete file from svn?


This is the order of events:

  1. had a file I wanted to add to svn repo for committing.
  2. typed "svn add filename.py", and it confirmed that it added it.
  3. before committing, typed "svn ls" to see the tracked files.
  4. filename.py is not listed there.
  5. out of confusion, try to remove file, and then readd it again. it won't let me do svn rm, so I do svn --force delete, thinking that would just untrack it from versioning, and not actually delete the file. I'm dumb.
  6. File is gone. File was never committed because I was just trying to add it then, so it's not like I can revert to a prior version.

Any way to get this back? I'm pretty desperate.

Thanks.


Solution

  • You've, ehm, svn delete --force it. You can't recover it unless you have a copy somewhere.

    By svn adding the file, you only scheduled it to be added on the next commit. You should've svn commited it to the repository.