SVN: Revert to a Previous Revision Using Reverse Merge

How to Revert to a Previous SVN Revision

If you ever need to revert a trunk or any other directory in Subversion (SVN) to a previous revision, or effectively remove a specific revision’s changes, simply perform a reverse merge.

Here’s the command:

svn merge -r1001:1000 .

In this command:

  • 1001 is the newer revision you want to undo or remove.
  • 1000 is the older, previous revision you want the merge to calculate changes from (i.e., the state you want to revert to).

After executing the merge command, you’ll need to commit the changes:

svn commit -m "Reverting changes introduced in revision 1001."



Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Optimizing Large Language Models A Look at Key Techniques
  • Nginx Reverse Proxy for Amazon OpenSearch Kibana with Ansible
  • Terraform Example: Serverless React App with AWS API Gateway and Lambda
  • Application Load Balancer - Host- and Path-Based Routing for Multiple ECS Services
  • Exporting React Components to PDF