tags:

views:

933

answers:

6

Lets say I did a check out, edited some stuff and realized I want to re-download the repository code and overwrite my local changes without commiting them.

I downloaded a project, made some edits and I realize I don't like my local changes (which I haven't comitted yet). How can I get back to the current state of the repository without deleting the folder?

How do I do this?

A: 

Just delete the folders (not svn delete, but file-system delete) that contain those files, then sync from a common root to replace them.

jeffamaphone
+5  A: 

right click-tortoise svn-revert

eglasius
+2  A: 

revert.

It should appear in the menu when you right click on the file you changed. That should lose your changes.

Sam Hoice
+2  A: 

If you just update then Subversion will merge the changes made in the repository into your local copy. An update won't cause your changes to be sent to the repository.

To remove your changes from your working copy, select the files/directories you want to revert and choose Revert from the TortoiseSVN menu.

Dave
A: 

You can either revert the changes (right-click, it's an option) or you can delete the file(s) in question and update. The difference is, revert will revert to the last version you checked out, while delete and update will "revert" to the latest version in the repository, depends on what you're trying to accomplish. Oh, and revert can be done w/out access to the repository, where delete and update can't.

Andy adds a good point that a diff is in order to make sure you're discarding what you think you're discarding. Many times I've forgotten about changes I've made and blew away more than I thought I was.

WaldenL
+2  A: 

From the Explorer context menu, TortoiseSVN, Revert (you may have moved some common commands up from the Tortoise sub-menu to the main context menu).

However, before reverting, I would do a diff (context menu, TortoiseSVN, Diff with previous version) to be certain that you are only throwing away what you think you're throwing away.

It is very easy to only think of the most recent changes and forget that you haven't committed something you want to keep.

Andy Dent
>and forget that you haven't committed something you want to keep.Heh! Been there.. done that! Good point!
WaldenL