Darragh
Darragh

Reputation: 2656

Is it possible to undo an SVN commit WITHOUT changing my working copy?

I've accidentally checked-in a file to SVN.

I'd like to undo this.

I know I can svn merge -r COMMITTED:PREV. and then check-in my working copy.

But now I've lost the work I've done locally.

Is there a better way?

Upvotes: 3

Views: 588

Answers (2)

Lazy Badger
Lazy Badger

Reputation: 97282

If you have modified Working Copy, you can (except noted recipes)

  • Commit changes and reverse-merge later, in clean WC
  • Discover branching and merging: save you modified WC as new branch, reverse-merge trunk, merge branch to trunk
  • Save changes into patch (svn diff), restore pristine WC (svn revert), reverse-merge, apply patch back

Upvotes: 1

alroc
alroc

Reputation: 28174

Check out another working copy & perform your reverse merge there. Or copy your changes elsewhere, perform the merge, then copy your changes back.

Upvotes: 2

Related Questions