Ignore files or folders on svn update

Published by Subhas Fagu on 30/05/09 15:01:17
Last edited on 30/05/09 16:04:37

If you don't use some kind of source control management or version control system and your working with a team of 2 or more, then we strongly advise you do.

This article covers the simple task of ignoring files on svn update. In our case, we needed to exclude our application's config files. This way we can have a DEV, QA and LIVE environment, all easily updated with svn while maintaining there respective config files.

This is done by editing the svn:ignore property

svn propedit svn:ignore ./the_folder

This will load the editor specified in the env var SVN_EDITOR.

SVN_EDITOR='"/bin/vi"'
   export SVN_EDITOR

This will set VI as your default editor for SVN, you may set it to either nano or emacs, your choice

Once you run the svn propedit command, it will fire up your specified editor, here you can specify either the entire folder or specific files

*
or
database_config.php

I don't think it supports regular expression however you can use the * wildcard. Below is a script that ignores all files ending in config.php

*config.php
About the Author

Subhas Fagu is an energetic person who you will never catch doing the same thing twice…unless it’s working. He’s always engaged in new concepts, frameworks, operating systems, applications, you name it and you’ve got a conversation. Being a founder of Techlicity Ventures, he's been a key in the business and technical development of all previous and upcoming projects. Subhas contributes a wide variety of perspectives to all projects to ensure risk coverage and smooth deployment.

Bookmark and Share
Blog Widget by LinkWithin
blog comments powered by Disqus

Valid XHTML 1.0!