I committed some sensitive data into the SVN by mistake. I don't want my collaborators to see these data. Can I revert the SVN to the previous state and remove the latest revision from SVN history (pretends that the latest commit were never made at all)?

  • 4
    If it's a password, even if you do manage to remove it, you should change the password wherever it's used. Assume it's been seen. – Bob May 16 '12 at 5:44
  • Above comment very true. How do you know no one has already checked out that revision? You can't change those. – Daniel Andersson May 16 '12 at 11:45
  • 1
    If you're using Apache as your SVN server, then you should be able to check the server logs to actually see if the password-containing file has been checked out, cat'ed or exported. – Lèse majesté May 18 '12 at 5:11

Not easily - you can use svndump and svndumpfilter to filter out that revision, or if you have backups of the server side, restore from a backup before the checkin. In the first case you'll end up creating a new repository (new UUID) so everyone will know it's been changed server side. Sorry, but SVN is deliberately hard to actually remove data from.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.