Friday, January 16, 2009

How to use, add, and remove svn:ignore

This was pulled from http://www.imarichardson.com/2007/05/26/adding-and-removing-subversion-directories-using-svnignore/

26 May, 2007
Adding and removing subversion directories using svn:ignore

Posted by: imarichardson In: Programming & Development

So I inadvertently added a directory to ignore in subversion only to find out after I deployed (capistrano) that I should not have. So I wrestled around for about 20 minutes when it dawned on me: why not just check the svn help on my box. Nonetheless, here’s what it is:

To add to subversion, use one of the following:

1. imarichardson $ svn propset svn:ignore filename.txt directory/
2. imarichardson $ svn propset svn:ignore "*" directory/

To add in a specific file from a directory, or match a wildcard, respectively. In the second line I’m just using all the contents from the directory.

To remove a directory,

1. imarichardson $ svn propdel svn:ignore directory/

… to delete the svn:ignore reference from the directory.


--

Wasn’t that useful?

Also useful links (hopefully that don’t disappear).
http://stackoverflow.com/questions/414879/how-to-remove-a-file-folder-from-a-svn-repository-and-add-to-ignore-list
http://sdesmedt.wordpress.com/2006/12/10/how-to-make-subversion-ignore-files-and-folders/

As a test (of my dedication), PDFs of the pages in question.

http://csua.berkeley.edu/~vaheder/blogpdf/vahederBlogspotCom/svnignore1.pdf
http://csua.berkeley.edu/~vaheder/blogpdf/vahederBlogspotCom/svnignore2.pdf
http://csua.berkeley.edu/~vaheder/blogpdf/vahederBlogspotCom/svnignore3.pdf

No comments: