How can I do it?
The first answer that comes to mind is: Make your changes and "svn commit" them. However, in this case it will look like I try to remove the changes that were added by other users. Moreover, it might be that recently I accidentally made some changes to the code that I did not meant to do.
The second answer that comes to mind is: First, "svn update" your local code then make your changes and then "svn commit" them. However, in this case "update" will try to merge the new code from the svn server with my code that may contain the above mentioned accidental undesired changes from me.
The third answer that comes to mind is: First, "svn revert", make your changes and then "svn commit". But it also will not work, because by "svn revert" I do remove my accidental changes (this is good) but I get the old version of the code and if I try to "svn commit" it to the svn server, it will look like I try to remove the changes done by other.
So what is the solution. To summarize, I want to get the newest version of the code from the SVN repository and I do not want to merge this code with my local changes (I want to overwrite my local changes).
There are two things you can do:
Normally, you want to keep the changes you did and merge them back into the changes others have done. If you need a clean checkout, checkout a new working directory. That's the easiest and it keeps your changes. If you don't want your changes, revert them, run svn status
to verify you have no changes in the working copy (or nonversioned files), and then do an update. It will be a bit faster than a new clean checkout.