How do I remove a file from svn versioning without deleting it from every working copy?

后端 未结 4 2249
别跟我提以往
别跟我提以往 2020-12-15 17:09

My situation is that a bunch of files are checked into svn which are very annoying to have under source control (specifically a log4j.properties file), and I wo

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 17:21

    The secret is to make sure it's on the ignore list before you commit the delete. If you do it in that order, the delete won't propagate to others' working copies.

    We're still using svn 1.4 so the --keep-local option isn't available. But you can achieve the same thing by deleting it using a server path and a -m commit message.

    So in my example I accidentally committed a directory called nbproject. That is where developer project setting for the IDE we use (NetBeans). I didn't want to delete that from everyone's working copies or they'd lose all their settings! But this did the trick. Starting from the parent directory:

    $ cd trunk
    $ svn propedit svn:ignore .
    

    brings up $EDITOR

    add nbproject on its own line and save

    $ svn commit -m 'Ignore nbproject'
    $ svn rm https://.../trunk/nbproject -m 'Remove nbproject from svn'
    

提交回复
热议问题