Wednesday, February 27, 2008

SVN-How to set ignore-list

Keywords: Subversion, svn, tortoiseSVN


Subversion is a powerful source code control system. We can upload the source code into svn database. In many cases, we do not want to version some types files, such as bin folder and .user file. There are 2 ways to set ignore list.


For example, In .net development, some files need always ignore to verion such as bin obj *.suo *.obj *.pdb *.exe *.dll *.csproj.user


1. For one specific directory, we can use the tortoiseSVN to achieve it.


Steps:

Select one folder in explorer and then select the property menuitem. In Property/Subversion window, click the properties button,


And then click add button, select svn:ignore in the property combobox in subsequence window, Input the file extension in the textbox


2. Set global Ignore list.


Steps:


Find the config file for subversion, which is located in "\Documents and Settings\<user>\Application Data\Subversion" and the file name is Config with no extension.


To get it to ignore these directories or files, you need to uncomment or edit the global-ignores line. In mine, I have it set to:


global-ignores = bin obj *.suo *.obj *.pdb *.exe *.dll *.csproj.user


This will causes it to ignore the bin and obj sub-directories of a typical Visual Studio projects.



No comments: