How to make SVN ignore multiple files/folders
Subversion (SVN) is a version controlling system, for those who are not familiar with I need to say. For more information about Subversion, you can visit's here.
Making svn ignore some specific files will enable you not to commit the files you choose. I am planning to write a lengthy post about usage areas of this feature if I have enough time. Until then, you know, talk is cheap, here's the code:
$ svn propset svn:ignore <filename_here> <directory_here>
is the standard command when you want to make svn ignore some files. This is basics, even a 8 years old girl can setup her svn repository to ignore some files.
But what if you want to make svn ignore multiple files or folders? Now you need a real competent, knowing what to do type system administrator 8-) Just kidding, all you need to fiddle around for some time. I did the fiddle, and found the answers. You have two alternative methods, i recommend the latter one:
File Method
Create a text file containing one file/folder to be ignored per line. Assuming this file's name is ignoreme
, the command you need is:
$ svn propset svn:ignore -F ignoreme .
I don't recommend this method because this will make you have one unnecessary file (the text file in which you list files/folders to ignore). Working clean is better, if you agree, follow me.
Propedit Method
The magic is:
$ svn propedit svn:ignore .
This will open your favorite editor (you don't have one? i'll explain how to adopt one soon) listing the files and folders to be ignored by svn. Just like in the file method I mentioned previously, you can add one file or folder to be ignored per line. Voila! Now all you need to do is to commit changes.
You can check if you have a selected an editor to be used by default by
$ echo $EDITOR
If you see an empty line, this means you haven't defined one. However, defining is no hassle.
$ export EDITOR='vim'
is enough. vim
? You can't does terminal? Try kwrite
, gedit
or geany
. It is all up to you.