Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to undo a commit in SVN? [duplicate]

Tags:

svn

Possible Duplicate:
Subversion: Retract Accidental Checkin

How do you undo a commit of a file in SVN?

like image 929
philfreo Avatar asked Dec 24 '10 16:12

philfreo


People also ask

How do you undo a commit in svn?

To undo a specific revision you can use the following command: $ svn merge -c -r3745 . In case you have other edited files in working directory, you can commit only the relevant files. Please note that undoing actually will mean you create a new revision with the negatives changes of last commit.

How do I revert changes in svn?

Right click on the selected revision(s), then select Context Menu → Revert changes from this revision. Or if you want to make an earlier revision the new HEAD revision, right click on the selected revision, then select Context Menu → Revert to this revision.

What is revert in svn?

Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will not only revert the contents of an item in your working copy, but also any property changes.

How can I get previous revision from svn?

On the file, simply right-click => Team => Switch to another branch/tag/revision. Besides the revision field, you click select, and you'll see all the versions of that file.


1 Answers

svn merge -r COMMITTED:PREV . 

or

svn merge -c -1708 path/to/file 
like image 181
philfreo Avatar answered Sep 24 '22 05:09

philfreo