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

前端 未结 15 1322
被撕碎了的回忆
被撕碎了的回忆 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:17

    In Git, in order to delete it from the tree, but NOT from the working directory, which I think is what you want, you can use the --cached flag, that is:

    git rm --cached 
    

提交回复
热议问题