<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vonk's Blog &#187; ignore</title>
	<atom:link href="http://blog.larsvonkconsultancy.nl/tag/ignore/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.larsvonkconsultancy.nl</link>
	<description>Blogs about Software Development, Agility and all the Rest</description>
	<lastBuildDate>Fri, 31 Jul 2009 13:51:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ignoring files on svn:import with subversion</title>
		<link>http://blog.larsvonkconsultancy.nl/2009/05/ignoring-files-on-svnimport-with-subversion/</link>
		<comments>http://blog.larsvonkconsultancy.nl/2009/05/ignoring-files-on-svnimport-with-subversion/#comments</comments>
		<pubDate>Fri, 15 May 2009 07:18:07 +0000</pubDate>
		<dc:creator>Lars Vonk</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[ignore]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://lvonk.wordpress.com/?p=65</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Sometimes when I start a project I already have some folder structure and code in place that I want to put into Subversion. However there are also already some files and folders present that I want to ignore on import. Subversion does not provide a way to ignore files on <a href="http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.ref.svn.c.import" onclick="pageTracker._trackPageview('/outgoing/svnbook.red-bean.com/en/1.5/svn-book.html_svn.ref.svn.c.import?referer=');">svn:import</a> using the command line. But by using the <a href="http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.advanced.confarea.opts.config" onclick="pageTracker._trackPageview('/outgoing/svnbook.red-bean.com/en/1.5/svn-book.html_svn.advanced.confarea.opts.config?referer=');">global-ignores</a> feature you can ignore files on svn:import when you follow these steps.<br />
<span id="more-65"></span></p>
<p>1. First locate the Subversion <em>config</em> file. Most probably you will find it at <em>${HOME}/.subversion/config</em>. In the file locate the <em>global-ignores</em> line and add the patterns you wish to exclude from the import, typically these are generated files like <em>.class</em> files etc. For instance in a Maven, Java, Eclipse project you would put: <code>global-ignores = target .classpath .project .settings</code></p>
<p>2. Run <code>svn:import [PATH] URL</code>. Now everything you put in the global-ignores line is excluded from the import.</p>
<p>3.  You still do not have a working copy though since svn:import does not replace the local files with the working copy. To achieve this you can run <code>svn co --force URL [PATH]</code></p>
<p>4. Now the files you put in global-ignores on your local file system are not ignored on your colleagues machine when they do a fresh checkout. So they could be temped to check-in the generated files. To prevent this you need to add the files to the svn:ignore list of the parent folder using the propset (or propedit) command. To achieve this you first need to comment out the global-ignores line in your config file. Then add the generated files to svn:ignore and check the code in.</p>
<p>This way you can check-in new code into subversion without having to manually remove all the generated files first. It would be nice though if Subversion provided a way to ignore files on import and checkout the code in a single command.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.larsvonkconsultancy.nl/2009/05/ignoring-files-on-svnimport-with-subversion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
