37

Possible Duplicate:
Subversion: Retract Accidental Checkin

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

Community
  • 1
  • 1
philfreo
  • 41,941
  • 26
  • 128
  • 141

1 Answers1

76
svn merge -r COMMITTED:PREV .

or

svn merge -c -1708 path/to/file
philfreo
  • 41,941
  • 26
  • 128
  • 141
  • @LP.Gonçalves do `svn help merge`. The `COMMITTED` and `PREV` targets are names that resolve to the previously committed revision, and the previous revision. philreo also gave an example referencing the revision by number. – mike Sep 28 '17 at 03:49
  • 4
    Ugh, **careful**, that does the *opposite* of what’s asked: it discards the changes to the file *locally* but keeps the commit upstream. – Konrad Rudolph Jan 04 '19 at 10:34