<p>I have a project which is source controlled using Subversion and VisualSVN. Since the version of web.config is different on the server and the developers' computers I want the file to remain on the computers but to be ignored by Subversion. I added it to the svn:ignore but it still remains (and still has a red exclamation mark too since we are not committing it).</p>

<p>How can I remove it from Subversion safely without it being deleted from the files system</p>

<p>Thanks,
Adin</p>

[{'answer_id': 56142, 'author': 'ibz', 'author_id': 5475, 'author_profile': 'https://Stackoverflow.com/users/5475', 'pm_score': 1, 'selected': False, 'text': '<pre><code>svn rm --force web.config\nsvn commit\n</code></pre>\n\n<p>Be careful to back up your local copy (of web.config) before doing this, since it will be deleted.</p>\n'}, {'answer_id': 56214, 'author': 'Vitor Silva', 'author_id': 1842864, 'author_profile': 'https://Stackoverflow.com/users/1842864', 'pm_score': 4, 'selected': True, 'text': '<p>you\'ll have to do both the remove and ignore operation</p>\n\n<ul>\n<li>first make a backup of your local file (like @ibz said)</li>\n<li>then remove the web.config from the repository.</li>\n<li>then copy back the web.config to the same folder</li>\n<li>finally use svn:ignore so that subversion does not try to add it again to the repository</li>\n</ul>\n\n<p>since i use tortoisesvn i can\'t really tell you what svn commands you have to use, but using tortoisesvn it would be:</p>\n\n<ul>\n<li>make backup</li>\n<li>right click on web.config on the folder under source control, select TortoiseSVN | Delete</li>\n<li>right click on web.config on the folder under source control, select SVN Commit => after this you will notice that the file is actually deleted from the file system</li>\n<li>move up and right click on the folder under source control, select TortoiseSVN | Properties</li>\n<li>on the properties window click new + property name "svn:ignore"; property value "web.config". accept changes</li>\n<li>commit changes</li>\n</ul>\n\n<p>on my .net projects i include the following exclusion with svn:ignore: bin, obj, *.suo, *.user</p>\n'}, {'answer_id': 538879, 'author': 'Chetan S', 'author_id': 31284, 'author_profile': 'https://Stackoverflow.com/users/31284', 'pm_score': 2, 'selected': False, 'text': "<p>Ideally, you should maintain versions of server's copy of web.config in SVN too. We usually rename the production web.config to web.config.prod (a copy for each of the environments) and have the build tool pick the right file and rename it back to web.config while packaging for deployment.</p>\n"}, {'answer_id': 2685099, 'author': 'Gökhan Ercan', 'author_id': 7751, 'author_profile': 'https://Stackoverflow.com/users/7751', 'pm_score': 0, 'selected': False, 'text': '<p>I have solved this issue using nant with ccnet. Following nant build script replaces web.test.config file with local web.config file;</p>\n\n<pre><code>&lt;?xml version="1.0"?&gt;\n    &lt;project name="Project1" default="build"&gt;\n      &lt;target name="init" depends="clean" /&gt;\n      &lt;target name="clean" /&gt;\n      &lt;target name="checkout"/&gt;\n      &lt;target name="compile"/&gt;\n      &lt;target name="deploy"/&gt;\n      &lt;target name="test"/&gt;\n      &lt;target name="inspect"/&gt;\n      &lt;target name="build" depends="init, checkout"&gt;\n        &lt;call target="compile" /&gt;\n        &lt;call target="inspect" /&gt;\n        &lt;call target="test" /&gt;\n        &lt;call target="deploy" /&gt;\n      &lt;/target&gt;\n\n      &lt;copy file="..\\TestDeployments\\Project1\\Project1.Solution\\Project1.Web.UI\\web.Test.config" \n          tofile="..\\TestDeployments\\Project1\\Project1.Solution\\Project1.Web.UI\\web.config" \n          overwrite="true" \n       /&gt;\n       &lt;delete file="..\\TestDeployments\\Project1\\Project1.Solution\\Project1.Web.UI\\web.Test.config" /&gt;\n\n    &lt;/project&gt;\n</code></pre>\n\n<p><a href="http://nant.sourceforge.net/release/latest/help/tasks/copy.html" rel="nofollow noreferrer">NAnt Copy Task</a></p>\n'}]
['https://Stackoverflow.com/questions/56096', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5754/']