Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace wrong code (committed by mistake) into the repository

Tags:

svn

I am newbie with svn and I stuck after a mistake.

I have two systems:

a) system 1 - working copy with the right code

b) system 2 - working copy with wrong code, committed to the repository by mistake

I would like re-commit the right code from system 1 but I can't. If I change a file and I try to commit it I get the message:

file xyx is out of date

Obviously I can't update the system 1 working copy otherwise I loose the right code.

How can I exit from this deadlock ?

Thank you

Fab.

like image 564
Fab Avatar asked Dec 28 '22 06:12

Fab


1 Answers

Here is an article on how to undo a commit using Subclipse:

How to undo a commit

Basically, you open the history view, select the bad revision and revert it, using the context menu (from the article):

alt text

You can undo the commit from the command line, using svn info / log / merge. Here is a brief article on how to it that way: svn undo from command line

like image 110
Michael Goldshteyn Avatar answered Jan 29 '23 10:01

Michael Goldshteyn