Sunday, November 27, 2011

How to revert SVN or roll back to the previous subversion.

How to revert your application to the previous stag after the wrong commit. really in subversion you can't go back but you can merge your copy to the previous repository subversion.And then correct your mistake.


follow this steps:
1. Open your Terminal/Command Prompt and go to your SVN directory.
    This step will perform dry run.
2. svn merge --dry-run -r [current_version]:[previous_version] http://yourrepositorypath.com/projectname/trunk


This step will perform merge operation.
3. svn merge -r [current_version]:[previous_version] http://yourrepositorypath.com/projectname/trunk


4. svn commit -m "Reverted to revision [previous_version]"


Optional step to see the different of your revision.
5.svn diff -r [current_version]:[previous_version] 


6.SVN update.


Hopefully this would be help.

No comments:

Post a Comment