- Few days ago I "updated" my local copy of the source code (i.e. I took the code from the SVN repository).
- After that the code was changed by other people and committed to the repository.
- Now I want to make some changes to the code and also commit it to the repository.
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).