<?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>gnapse.com &#187; vcs</title>
	<atom:link href="http://gnapse.com/blog/tag/vcs/feed/" rel="self" type="application/rss+xml" />
	<link>http://gnapse.com/blog</link>
	<description>whatever comes to my mind</description>
	<lastBuildDate>Wed, 02 May 2012 15:08:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>gitignore++</title>
		<link>http://gnapse.com/blog/2009/12/18/gitignore/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gitignore</link>
		<comments>http://gnapse.com/blog/2009/12/18/gitignore/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 21:31:14 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=108</guid>
		<description><![CDATA[I always wondered why Rails developers on the Mac keep adding those .DS_Store files into the .gitignore file of their project repo. It just doesn&#8217;t feel right. When I cloned some of these repos in ubuntu I always wondered what the hell that file has to do with me.  I also felt bad every time [...]]]></description>
			<content:encoded><![CDATA[<p>I always wondered why Rails developers on the Mac keep adding those <code>.DS_Store</code> files into the <code>.gitignore</code> file of their project repo. It just doesn&#8217;t feel right. When I cloned some of these repos in ubuntu I always wondered what the hell that file has to do with me.  I also felt bad every time I added my <code>nbproject</code> folders and <code>*.kpf</code> files to my <code>.gitignore</code> list back in the days when I used Netbeans and Komodo to program in Rails. People interested in my projects need not be seeing this when they clone my code.<span id="more-108"></span></p>
<p>It turns out that <a title="Git Version Control System" href="http://git-scm.com/" target="_blank">git</a> offers three mechanisms to specify which files to ignore. Most people know about the <code>.gitignore</code> files inside the working tree. But if you take a look at the <a href="http://www.kernel.org/pub/software/scm/git-core/docs/gitignore.html" target="_blank">gitignore documentation</a> you&#8217;ll find out that there&#8217;s a second file to specify ignore patterns that are specific to a given user&#8217;s work-flow, but that shouldn&#8217;t be cluttering the .gitignore files inside the repo, which are normally also versioned by git and thus shared by all the developers working in the project. Patterns like these should go in the <code>$GIT_DIR/info/exclude</code> file, where <code>$GIT_DIR</code> usually refers to the <code>.git/</code> directory inside your working tree.</p>
<p>Nobody cares what&#8217;s your favorite editor and you shouldn&#8217;t be cluttering the ignore files versioned inside the repo with the patterns of the files generated by your working environment. That way your buddies on a Mac won&#8217;t laugh at you when they notice you are stuck with Netbeans because you&#8217;re on Linux, or that you are geeky enough to use Emacs or Vim instead of the sexy TextMate.</p>
<p>But wait. We still have to repeat all those pesky private ignore patterns in every different project, when we should be able to tell git globally about the garbage we normally want to ignore. <a title="Don't Repeat Yourself" href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">DRY</a> anybody?</p>
<p>You&#8217;re right. That sounds very stupid. We are programmers after all. We&#8217;re supposed to be clever and lazy. So is the guy who invented all this git thing. It turns out that you can specify a global <code>.gitignore</code> file via <code>git-config</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git-config</span> <span style="color: #660033;">--global</span> core.excludesfile <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>ernesto<span style="color: #000000; font-weight: bold;">/</span>.gitignore</pre></div></div>

<p>The file doesn&#8217;t have to be named <code>.gitignore</code> and it doesn&#8217;t have to be in your home directory. The <code>core.excludesfile</code> configuration directive is there precisely so that you can put this global ignore file anywhere you want. Also, beware of using <code>~/</code> to specify that the file is in your home directory. The documentation says that it works and expands it to the value of the <code>$HOME</code> environment variable, but it doesn&#8217;t work in my Mac.</p>
<p>So now you can go and edit that file and put the things that bother you privately. Mine for instance is something like this.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.DS_Store
.svn
<span style="color: #000000; font-weight: bold;">*</span>~
<span style="color: #000000; font-weight: bold;">*</span>.<span style="color: #7a0874; font-weight: bold;">&#91;</span>oa<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">*</span>.kpf
nbproject
Thumbs.db</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/12/18/gitignore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AMP: One VCS to rule them all</title>
		<link>http://gnapse.com/blog/2009/11/30/amp-one-vcs-to-rule-them-all/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amp-one-vcs-to-rule-them-all</link>
		<comments>http://gnapse.com/blog/2009/11/30/amp-one-vcs-to-rule-them-all/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 18:59:56 +0000</pubDate>
		<dc:creator>ernesto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[bazaar]]></category>
		<category><![CDATA[distributed vcs]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://gnapse.com/blog/?p=95</guid>
		<description><![CDATA[If you are a programmer and you already know something about git, mercurial, bazaar or some other modern distributed version control system, you should give AMP a try. And no, it is not a VCS in the most strict sense of the concept, but a meta-tool for VCS ease of use. Currently it works as [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a programmer and you already know something about <a href="http://git-scm.com/" target="_blank">git</a>, <a href="http://mercurial.selenic.com/" target="_blank">mercurial</a>, <a href="http://bazaar-vcs.org/" target="_blank">bazaar</a> or some other modern distributed version control system, you should give <a href="http://amp.carboni.ca/" target="_blank">AMP</a> a try. And no, it is not a <abbr title="Version Control System">VCS</abbr> in the most strict sense of the concept, but a meta-tool for VCS ease of use.</p>
<p>Currently it works as a Ruby interface to Mercurial, but they are aiming high. According to their own definition, &#8220;[their] goal is to produce a piece of software that lets you forget that you&#8217;re working on git project one moment and a Mercurial project the next.&#8221; A sort of meta-interface for most modern distributed VCS&#8217;s out there, so that you can use them all with the same set of commands, or maybe even interact between different VCS&#8217;s. Although I haven&#8217;t had the time yet to truly play with it, It appears to be highly customizable.</p>
<p>BTW, they also mention svn and cvs as VCS&#8217;s they want to support, but I can&#8217;t see why to drain out resources into these dinosaurs. I still don&#8217;t get why people still use centralized-only VCS&#8217;s if they have the choice of distributed version control. But anyway, I wish them good luck with the project overall, and I will sure keep an eye on it for a while.</p>
]]></content:encoded>
			<wfw:commentRss>http://gnapse.com/blog/2009/11/30/amp-one-vcs-to-rule-them-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

