Is there a way to revert from a particular changeset?
The changes has been committed, as I see from the changeset. Now, I want to revert back the files from before they were committed.
I did svn revert path/to/file but it's not asking for a password or anything. Nothing is happening.
You can do a "reverse merge" i.e. "apply" all the changes FROM your current revision TO the revision you want to go back to (i.e. undo all the changes FROM the revision you want to go back to TO the current revision).
svn merge -r HEAD:nnnn .
where nnnn
is the revision you want to go back to. http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.merge.html
After reviewing the changes, resolving any conflicts etc., use svn commit
to push the changes to the repository.
Solved: svn merge -r1234:4321 path/to/yourfile path/to/thefileyouwanttogobackto,
where
1234 is your revision
4321 is the revision you want to go back to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With