Search code examples
svnrevert

How to perform svn revert locally except a single file


I have made changes to multiple files in my folder locally for testing purposes. However, I would like to revert them back to original condition except a single file, which I still need in the present condition. Presently, I use

svn revert -R .

which reverts all of them to original condition. Could someone help me, how to use a command that excludes a single file in this operation?


Solution

  • Two choices:

    • Add all needed to reverting files in changelist (add all, remove single file), use revert --cl
    • Store all files in text-file (space-separated list), pass it to revert --target FILE

    You can also commit current state of WC into some temporary branch, revert all, merge singe file from branch to trunk