Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn update is not updating!

Tags:

svn

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!

like image 618
hasen Avatar asked May 08 '09 15:05

hasen


People also ask

What is svn update command?

The SVN update Command. The svn update command lets you refresh your locally checked out repository with any changes in the repository HEAD on the server. It also tells you what has been changed, added, deleted. If a change has been made to a file you have also changed locally, svn will try to merge those changes.

Which command is used to update to the latest version in svn?

Simply type svn update [name-of-directory] , or cd to that directory and type svn update there.


2 Answers

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

like image 176
Benjamin Ortuzar Avatar answered Sep 23 '22 11:09

Benjamin Ortuzar


I just wanted to add a little to what diyism posted.

I didn't see the . next to the ; in the line

svn revert -R .; svn up 

and it confused me. I don't know why you need to explicitly use . for all files when using revert and you don't using update but that seems to be the way it is.

So, in case it helps anyone, I thought it would be more clear to see the answer as two lines

svn revert -R . svn update 
like image 36
Grant Johnson Avatar answered Sep 19 '22 11:09

Grant Johnson