tags:

views:

1681

answers:

7

I want svn update to overwrite my local file with the files from the server, even if my local files have modifications, I want to throw them away and use the version that's on the remote repository.

How do I do that? I tried svn update --force but it doesn't work.

Update:

Thanks for the answers, so I'm using revert like this:

svn revert . -R

Is this how I'm supposed to use it? is it safe? I have a git repository in the same pace and I don't want svn to corrupt my .git for me!

+2  A: 

Use "Revert" instead.

Otávio Décio
+13  A: 

You should use SVN revert. This would revert the files in your working copy to their original state. For more information and examples check the svn book here: http://svnbook.red-bean.com/en/1.1/re25.html

Benjamin Ortuzar
why did you make it a wiki?
hasen j
i thought it would be a good idea, so people could improve the answer. But now that i read the FAQ, it wont give me any reputation :( And I dont seem to be able to undo it :( Every day is a school day :)
Benjamin Ortuzar
ok, better luck next time hehe!! btw, what usually happens if someone has a better answer he will just post it and maybe refer to your answer if he wants to use it as a basis.
hasen j
+1  A: 

You have to revert your modifications, and if necessary do an update after that.

dr Hannibal Lecter
+1  A: 

use svn revert

p01nd3xt3r
+3  A: 

By the way, that's actually a feature of SVN. It will never overwrite any of your modifications when updating (unless you explicitly throw them away using revert.

0xA3
A: 

Worst case, delete the contents of your working copy (excluding the .svn folder) and do an update.

Troy Hunt
A: 

Yea but what if it's the root folder... then I have to literally delete the entire folder and redownload my entire repo. Takes forever down here in South Africa.

sounds like you want to add this as a comment to some answer, instead of writing an answer (since it doesn't answer anything)
hasen j