Reputation: 35141
So I have a local build file.
It shouldn't be in SVN at all, but, it is. (Thanks, previous maintainer!) But changes have been made to the local copy, which only apply to building on the box it's on.
I screw up and do a commit that commits this local build file. Now the SVN repo copy has these local changes; this is bad.
How can I get back to status quo ante, where the local changes are in the local copy, not in the SVN repo, and a subsequent svn update
won't overwrite the local changes?
Upvotes: 1
Views: 1962
Reputation: 568
If your file shouldn't be versioned, you can un-version it:
svn rm --keep-local filename
This will keep any local file, but SVN will stop tracking it.
Upvotes: 0
Reputation: 66223
For me this one works:
> svn st
M 0027
> svn info 0027 | grep URL
URL: svn://localhost/xxx/trunk/0027
> svn rm -m "remove accidently checked in file" svn://localhost/xxx/trunk/0027
Revision ...
> svn update
C 0027
At revision 42.
Summary of conflicts:
Tree conflicts: 1
> svn revert 0027
Reverted '0027'
> svn status
? 0027
So file 0027
is still alive, has it's old contents but is not in the repo anymore.
Upvotes: 0
Reputation: 97280
Upvotes: 0
Reputation: 691635
You might use changelists or lock the file to avoid making the same mistake again.
Upvotes: 2