Subversion: How to unversion the BIN and OBJ folders
In subversion/TortoiseSVN, I am wondering how to un-version a directory. We have a large number of projects, each with a BIN and OBJ folder which are under source control. I want to delete these two folders from subversion, but keep the folders locally.
I tried the "Delete (Keep local)" option, and that works on my machine. However when another developer performs an Update, their BIN and OBJ folders get deleted. I need it to simply become unversioned when the other developers perform an update, instead of having them removed from their machines.
Thanks ~Jam开发者_运维知识库es
You want to use the ignore operation from the TortoiseSVN context menu.
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-ignore.html
If you are using TortoiseSVN, just export to the current working copy location and it will remove the .svn folders and files.
http://tortoisesvn.net/node/343
A quick and dirty solution is to chmod -R a-w
those folders, so that svn can't remove them.
However, I would think that if it doesn't regenerate, it should be under version control, and if it does regenerate, it shouldn't matter?
Or would a recompile for everyone take prohibitively long.
Note that it will only remove them the first time, so as long as you protect the files through the first update, you should be fine.
EDIT: Or the classic 'copy a backup away; copy it back after update'.
I think the easiest way to do this would be to branch your code, remove the directories, then merge back into trunk.
All developers should add obj and bin folders to their global ignore before checking out the updated trunk.
I used the patterns from this answer and they worked for me: How do I configure the TortoiseSVN 'Global ignore pattern' properly?
Make sure you go to the parent directory and commit the deletions.
My solution for this sort of problem is to modify the project (msbuild) file to automatically recreate the bin/obj directories (if they are missing) before the compile step. Then svn remove the bin/obj directories, and finally update the .svnignore file to ignore the bin/obj directories. This way you don't try to store intermediary products, and yet the directories will be available as soon as you build, either in Visual Studio or with MSBuild.
精彩评论