I’ve been using TortoiseSVN for years. One place I’ve found it lacking in the past though was when I wanted to remove unversioned files from my working copy. This has generally been a nuisance but I’ve dealt with it. A few days ago, I needed to recover from a merge gone wrong and got serious about finding a better way.
Searching revealed the expected slew of scripts written in a variety of languages but one answer to a Stack Overflow question really stood out – it pointed out that TortoiseSVN has an extended context menu that includes a “Delete unversioned items…” option.
Note: To activate the extended context menu, shift + right-click and expand the TortoiseSVN menu.
As its name implies, the extended context menu contains items that generally aren’t shown in the default view (context sensitive, of course). In addition to the “Delete unversioned items…” option, the extended menu includes a few other occasionally useful options (highlighted above) such as:
- Diff with URL
- Break Lock
- Merge reintegrate…
- Delete (keep local) – not shown
Note: Each of the extended options can be selected in the TortoiseSVN Context Menu options.
As for deleting unversioned files, the process is pretty simple. Selecting the option displays a revert-like dialog containing list of the unversioned files in the working copy. Simply select the files you want to remove and click OK. Windows will then prompt for confirmation to move the selected file(s) to the recycle bin.