How to “unversion” a file in either svn and/or git

前端 未结 15 1324
被撕碎了的回忆
被撕碎了的回忆 2020-12-22 19:58

It happens to me all the time. I accidentally version a file, I do not want to be versioned (i.e. developer/machine specific config-files).

If I commit this file, I

15条回答
  •  遥遥无期
    2020-12-22 20:43

    Two simple steps in SVN:
    1. Add this directory in parent directory's svn:ignore property:

    svn propedit svn:ignore .  
    

    2. Remove directory:

    svn rm mydir
    

    3. Commit

    Please note that when other developers do a svn update, that directory will not get deleted. SVN just unversions it instead.

提交回复
热议问题