How do you remove a file from being version controlled without deleting the file in subversion?

妖精的绣舞 提交于 2019-12-21 19:25:55

问题


I accidentally added a binary file to SVN with the add command, and now I want to remove it from being version controlled, but not delete the file. How do I do this?


回答1:


svn rm --keep-local




回答2:


If you didn't commit yet, you can use "svn revert" to undo the add.




回答3:


As already mentioned svn rm --keep-local is the way to go.

A handy shortcut for those of you using TortoiseSVN: "Delete (keep local)" is available on the TortoiseSVN sub-menu if you hold the Shift button while right-clicking the file you want to delete.




回答4:


  1. Copy the file somewhere.
  2. SVN Delete it.
  3. Copy it back, and SVN ignore it this time.



回答5:


The simplest way I know how to do that is to move the file, delete the file using svn, and then move the file back.




回答6:


Don't you just mean to add it to the ignore list, then just remove the working copy? search for "ignore". In other words, it should remain to be version controlled, but shouldn't pick up any changes in your working copy. (Not entirely sure why you'd want to do this... perhaps there are better ways of achieving what you'd like to do)



来源:https://stackoverflow.com/questions/210933/how-do-you-remove-a-file-from-being-version-controlled-without-deleting-the-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!