SVN undo delete before commit

前端 未结 7 1509
离开以前
离开以前 2021-01-29 23:02

If you delete a directory from an SVN working copy, but haven\'t committed yet, it\'s not obvious how to get it back. Google even suggests \"svn undo delete before commit\" as a

7条回答
  •  感动是毒
    2021-01-29 23:14

    The simplest solution I could find was to delete the parent directory from the working copy (with rm -rf, not svn delete), and then run svn update in the grandparent. Eg, if you deleted a/b/c, rm -rf a/b, cd a, svn up. That brings everything back. Of course, this is only a good solution if you have no other uncommitted changes in the parent directory that you want to keep.

    Hopefully this page will be at the top of the results next time I google this question. It would be even better if someone suggested a cleaner method, of course.

提交回复
热议问题