By Alvin Alexander. Last updated: June 4, 2016
CVS FAQ - How do I go back to a previous version of a file?
Solution: What revision would you like to revert to?
Let's see ... I just messed up revision 1.25, so I would like to go back to version 1.24.
And what is the name of the file?
LoginController.java
Move to the directory where your file is located, then run this command:
cvs -Q update -p -r 1.24 LoginController.java > LoginController.java
This replaces your messed up revision of this file with the 1.24 revision of the file. You will need to commit this revision back into the repository now.
Note that this process works fine on Unix workstations. I don't use Windows, so I can't tell you if it works on that platform.