Computer Laboratory

Deleting/Renaming files and directories

This information is from TortoiseSVN Help

Subversion allows the renaming and moving of files and folders, which can be done from the TortoiseSVN submenu (see image below):

deleting files menu

Below lists the general instructions on how to delete or move files. It is advised, however, that you consult the TortoiseSVN Help for precise information on deleting files.


Deleting files

Where possible, always use TortoiseSVN -> Delete to delete files, so Subversion doesn't have to guess what you really want to do.
The following describes the numerous ways of deleting files, (and the muddle you can get in if you don't use TortoiseSVN -> Delete!)

Advanced notes

  • Commiting a parent folder:

    You must commit a folder rename before changing any of the files inside the folder, otherwise your working copy will become filled with old and new copies of the same file.
    This is because Subversion runs a delete command followed by an add command.
    If you don't commit the changed parent folder to show a deletion, it will stay behind and the new version will be added to it.
    This will mean that other authors won't know which is the correct version.

  • Getting a deleted file or folder back

    If you have not committed a delete operation to the repository, then use TortoiseSVN -> Revert to retrieve the file.
    If you have already committed the deletion:
    • Use the log dialogue box to find out the revision of your file
    • Open the repository browser and switch to that revision
    • Right-click the file or folder you deleted and select Context Menu > Copy to... as the target for that copy operation
    • Select the path to your working copy.