<?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>Rails on the Run &#187; contribute</title>
	<atom:link href="http://railsontherun.com/tag/contribute/feed/" rel="self" type="application/rss+xml" />
	<link>http://railsontherun.com</link>
	<description>Rails experiments by Matt Aimonetti</description>
	<lastBuildDate>Tue, 23 Feb 2010 07:28:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to use github and submit a patch</title>
		<link>http://railsontherun.com/2008/03/03/how-to-use-github-and-submit-a-patch/</link>
		<comments>http://railsontherun.com/2008/03/03/how-to-use-github-and-submit-a-patch/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 08:22:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[contribute]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[merb]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2008/06/18/how-to-use-github-and-submit-a-patch</guid>
		<description><![CDATA[If you don&#8217;t know about git and github yet, it&#8217;s time you clean up your RSS feeds and find some good source of information. Github is used by the Merb core team and I&#8217;ll show you how to use github to fork Merb, make your modifications and &#8220;submit your patch&#8221;. This is the exact reason [...]]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t know about <a href="http://git.or.cz/">git</a> and <a href="http://github.com">github</a> yet, it&#8217;s time you clean up your RSS feeds and find some good source of information.</p>
<p><a href="http://github.com">Github</a> is used by the <a href="http://merbivore.com">Merb core team</a> and I&#8217;ll show you how to use github to fork Merb, make your modifications and &#8220;submit your patch&#8221;.</p>
<p>This is the exact reason why github is simply awesome, it makes forking projects just super simple and submitting changes even easier.</p>
<p>First thing, you need to have a github account, if you don&#8217;t have one yet, email me, I have a couple of invitations left, otherwise, just wait until github gets public.</p>
<p>Now, let&#8217;s go to <a href="http://github.com/wycats/merb-core/tree/master">Merb&#8217;s repository</a> and fork Merb-core by clicking on the fork button.</p>
<p><img src="http://img.skitch.com/20080303-q2aceaadcqk59kqck4b199bdmh.jpg" alt="fork merb"/></p>
<p>Actually, for this example, I&#8217;ll fork <a href="http://github.com/wycats/merb-plugins/tree/master">merb-plugins</a> because I want to improve the ActiveRecord rake tasks.</p>
<p>Because I forked merb-plugins, I now have my own forked repo: !<img src="http://img.skitch.com/20080303-g8jas46gq1enn9fhu1t7rsyunj.jpg" alt="my forked repo"/></p>
<p>I&#8217;ll start by checking out/cloning my forked repo locally.</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre><tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }">git clone git<span class="iv">@github</span>.com<span class="sy">:mattetti</span>/merb-plugins.git</pre>
</td>
</tr>
</table>
<p>!<img src="http://img.skitch.com/20080303-rf87t44c3c6m6hqy5b38ksycua.jpg" alt="git clone"/></p>
<p>Great I can now make my own changes&#8230;. but wait, what if the merb core team makes a change to the code? Well, I need to track their changes. Here is how:</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre><tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }">git remote add coreteam git<span class="sy">:/</span>/github.com/wycats/merb-plugins.git</pre>
</td>
</tr>
</table>
<p>FYI, it adds the following to edit .git/config:</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt>  [remote <span class="s"><span class="dl">&quot;</span><span class="k">coreteam</span><span class="dl">&quot;</span></span>]<tt>
</tt>  url = git<span class="sy">:/</span>/github.com/wycats/merb-plugins.git<tt>
</tt>  fetch = +refs/heads/*<span class="sy">:refs</span>/remotes/coreteam/*<tt>
</tt></pre>
</td>
</tr>
</table>
<p>then </p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre><tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }">git fetch coreteam</pre>
</td>
</tr>
</table>
<p>and finally</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre><tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }">git checkout -b coreteam coreteam/master</pre>
</td>
</tr>
</table>
<p>You can now track the latest change and merge them with your branch. Note that you can also track other forks and merge some other changes. (just that feature is worth using git)</p>
<p>Alright, now you can do your stuff, and push your local change to your remote repo at github.</p>
<p>Once you are done, you can simply click on the &#8220;pull request button&#8221;</p>
<p><img src="http://img.skitch.com/20080303-xxh5d3a2uu65ksf8u4i9tga59e.jpg" alt="pull request button"/></p>
<p>fill up the form and select the recipient. (wycats in this example if you want him to merge your changes into the official version of Merb).</p>
<p><img src="http://img.skitch.com/20080303-dei7bxpt577gqe3d1x4ncpmq6w.jpg" alt="pull request"/></p>
<p>p.s: The github guys are working on a gem to make our loves easier, give <a href="http://github.com/defunkt/github-gem/tree/master">http://github.com/defunkt/github-gem/tree/master</a> a try. I&#8217;ll post about the gem when it will be a bit more stable.</p>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2008/03/03/how-to-use-github-and-submit-a-patch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

