Subversion : How to adding file/folder to ignore list with command line

Maybe we had known how to add file or folder (from this time and so on I will just said “file”) on IDE. On this case, I often using Eclipse, and adding file as ignore list in eclipse is like shooting fish in a barrel. But occasionally we have to using command line to complete it. and do not worry, this is not too difficult. I will show you how ­čÖé

There are 2 condition of file that we want to ignore. First, the file is already in svn repo and the others not in svn yet. How we tackle these? Remember to always remove file from svn repo first for this case. because we can not add file to ignore list while the file is on the repo. What we have to do just go to directory of our repo in local, and just do command below :

$ svn rm –keep-local filename

The command above will remove our file from svn but will keep the file on our local. just simple. after this, we can add them to ignore list with command below :

$ svn propset svn:ignore filename .

look at dot (.) sign at the end of command, after you do that. voila, the file will included in ignore list and will never be committed to repository. this last command also apply for all file that never commit before to the repo.

regards,

tandatangankecil

Leave a Reply

Your email address will not be published. Required fields are marked *