<?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>Dr Nic &#187; Git</title>
	<atom:link href="http://drnicwilliams.com/category/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Mon, 15 Mar 2010 20:51:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</title>
		<link>http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/</link>
		<comments>http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 13:25:21 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Gems]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=380</guid>
		<description><![CDATA[
Its almost Christmas time and that means presents.
It also means that sometime between today and December 25th you need to go out and buy other people some presents because you haven&#8217;t done it yet.
But there&#8217;s someone else special in your life that deserves an Xmas gift this year. That special someone is your open source [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/' rel='bookmark' title='Permanent Link: Hacking someone&#8217;s gem with github and gemcutter'>Hacking someone&#8217;s gem with github and gemcutter</a> <small> Ever used a rubygem, found a bug, and just...</small></li><li><a href='http://drnicwilliams.com/2008/10/31/newgem-100-all-thanks-to-cucumber/' rel='bookmark' title='Permanent Link: newgem 1.0.0 all thanks to Cucumber'>newgem 1.0.0 all thanks to Cucumber</a> <small>The New Gem Generator (newgem) was exciting, moderately revolutionary, and...</small></li><li><a href='http://drnicwilliams.com/2008/08/19/my-attempt-at-sake-task-management/' rel='bookmark' title='Permanent Link: My attempt at sake task management'>My attempt at sake task management</a> <small> I&#8217;ve used sake intermittently in my workflow. It competes...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://france.worldcupblog.org/files/2007/12/christmas-presents.jpg" title="Christmas present" class="alignright" width="300" height="278" /></p>
<p>Its almost Christmas time and that means presents.</p>
<p>It also means that sometime between today and December 25th you need to go out and buy other people some presents because you haven&#8217;t done it yet.</p>
<p>But there&#8217;s someone else special in your life that deserves an Xmas gift this year. That special someone is your open source projects.</p>
<p>You might think, &#8220;But, Dr Nic, what do I get for the open source project that already has everything? What gift would my open source projects possible appreciate?&#8221;</p>
<p>Its true &#8211; this year has been a boon for open source. You probably migrated your projects from SVN to Git this year. Specifically, you probably clicked the &#8220;create a new one&#8221; link on your GitHub home page a lot this year: either to migrate your old projects to github or start new ones. Lots of new ones.</p>
<p>And now that your code is on github, your README file is rendered beautifully on the home page, so you were more inclined to rename it to README.markdown or README.textile and thusforthly fill it full of education information about your projects. </p>
<p>More people would then instantaneously figure out what the f@#$ your project actually does, <strong>thus</strong> more people used it, <strong>thus</strong> more people wrote patches or forked your code and sent Pull Requests. </p>
<p>All round, in 2008, I bet your open source projects had a sweet year. </p>
<p>Nonetheless, it is Christmas time and you should now get them a present. Something they wouldn&#8217;t get for themselves. Something you wouldn&#8217;t have done for them except for the free loving spirit of Christmas.</p>
<h3>The Gift for all Open Source projects</h3>
<p><a href="http://drnic.github.com/macruby-tmbundle/"><img alt="" src="http://img.skitch.com/20081221-trfsetaeesnnk4p5u5i35yxckd.png" title="Sample website" class="alignright" width="358" height="216" /></a></p>
<p><strong>A website.</strong></p>
<p>Oh sure, github renders your README.markdown file. Yeah, yeah, github gives you a wiki for your project. Sure, sure, Google Groups let you communicate with your co-developers and users. Certainly, you don&#8217;t <em>need</em> a website for your project.</p>
<p>That&#8217;s why its a Christmas gift. You&#8217;re going to do it because you care.</p>
<p>Websites sell your project. READMEs and Wikis educate. The project website will sell it and make people want to use your stuff.</p>
<p>A website could have a blog with an RSS/atom feed. Then you could post updates about your project. People could subscribe and also leave comments. Oh the novelty.</p>
<p>And if it only took 5 minutes to get all this setup &#8211; the website code, the blog engine, the RSS feed, the comments, and published to its own hosted server &#8211; then that would just be oh so sweet.</p>
<p>So we&#8217;re going to do some craft for our Xmas present. A little DIY project, if you will. You&#8217;ll need a few things that you&#8217;ll find around your house, a command-line interface, and a beer or perhaps some port or sherry. Christmas cake is good too.</p>
<p><span id="more-380"></span></p>
<p>The commands below take about 5 minutes to execute and you&#8217;ll have a sweet website for your project, setup on GitHub Pages, just like the <a href="http://drnic.github.com/macruby-tmbundle/">macruby-tmbundle</a> and <a href="http://drnic.github.com/jekyll_generator/">jekyll_generator</a> sites, and the sample image above.</p>
<h3>Jekyll and GitHub Pages</h3>
<p><a href="http://github.com/mojombo/jekyll/">Jekyll</a>, by Tom Preston-Werner, is one of several static website generators. All your website content will be written in textile or markdown, rendered against some HTML layouts, and published on a website somewhere. We&#8217;re going to use <a href="http://github.com/blog/272-github-pages">GitHub Pages</a> because they are new and shiny, and free, and I&#8217;ve written some sake tasks (below) to make it all easy peasy to get up and running.</p>
<p>There are a bunch of reasons we&#8217;re going to use Jekyll to render our website:</p>
<p><a href="http://drnic.github.com/macruby-tmbundle/2008/12/19/running-macruby-inside-textmate.html"><img alt="" src="http://img.skitch.com/20081221-gkweyr5rq32frgfawhd17cpm5r.png" title="disqus - javascript comment system for static blog sites" class="alignright" width="316" height="322" /></a></p>
<p>One, textile and markdown are much nicer to write/edit text than HTML.</p>
<p>Two, Jekyll is &#8220;blog enabled&#8221;. That is, some of your pages will be specifically &#8220;blog post&#8221; pages, and elsewhere in your layout you can programmatically list them. Like a blog. Yeah.</p>
<p>Three, GitHub Pages automatically supports Jekyll but no other static-website generators. This saves you from having to manually render your HTML from your Textile/Markdown pages before pushing the site to the remove server.</p>
<p>Four, I wrote a stand-alone generator to create a Jekyll website for any project. It is preconfigured with <a href="http://disqus.com/">Disqus</a> for comments, including badges for latest comments etc. </p>
<h2 id="living-with-jekyll">Living with a Jekyll</h2>
<p>Jekyll comes as a RubyGem:</p>
<pre>sudo gem source -a http://gems.github.com/
sudo gem install mojombo-jekyll
</pre>
<p>You can either read the Jekyll <a href="http://github.com/mojombo/jekyll/tree/master#readme">README</a> and create your project website by hand (and then skip below to <a href="#living-with-github-pages">Living with GitHub Page</a>).</p>
<p>Alternately, you can cheat and use a generator.</p>
<h3>jekyll_generator</h3>
<p>For the last few years, newgem has come with the ability to create a website for your project. For the jekyll_generator I decided to go with a separate generator so that any project &#8211; rubygem, rails plugin, javascript project, etc &#8211; can easily use it.</p>
<pre>sudo gem install jekyll_generator
cd path/to/project
jekyll_generator website --title "Project Name"
cd website
jekyll
open _site/index.html</pre>
<p>The final steps performs the local rendering of your website (<code>jekyll</code>) and then on OS X it opens the rendered website into your browser. Otherwise, manually open the index.html from the _site folder.</p>
<p>Currently the generator assumes that your project is already in a git repository that is hosted on github (specifically that you&#8217;ve added the github project as the origin remote).</p>
<h2 id="living-with-github-pages">Living with GitHub Pages</h2>
<p>GitHub recently released <a href="http://github.com/blog/272-github-pages">GitHub Pages</a> as a place for you to publish a personal website and websites for each of your projects. Instead of requiring you to rsync or &#8220;rake website&#8221; your way to publishing glory, you just use git.</p>
<p>Specifically, you put your website in a branch called &#8220;gh-pages&#8221;. When you push commits in that branch to github it will automatically refresh your website. No rsyncing required. Also, it will run your website through Jekyll. </p>
<p>So much delicious magic.</p>
<p>Except our website is not currently in another branch. Its in master. In a folder called <code>website</code>. Where it should be.</p>
<p>But the boffins at github say we need to move our shit across to a branch called <cide>gh-pages</code>, and who are we to argue.</p>
<p>I personally will never be doing this migration manually. I figured it out once and slapped it into a sake task. It moves all the content in your website folder into this branch, and replaces it with a submodule link so you can access the website from your master branch. Didn't follow that? No, me neither. Let's just run the sake task and move on with our lives, and eat fresh prawns and Christmas pudding.</p>
<h3>Sake tasks to get started with GitHub Pages</h3>
<p>To install them from scratch (<a href="http://drnicwilliams.com/2008/08/19/my-attempt-at-sake-task-management/">initial blog post</a>):</p>
<pre>sudo gem install sake
cd /tmp
git clone git://github.com/drnic/sake-tasks.git
cd sake-tasks
rake install:all</pre>
<p>You can toss away the repo after installing the sake tasks.</p>
<p>You now have some tasks to manage <a href="http://github.com/drnic/sake-tasks/tree/master/github/pages">github:pages</a>:</p>
<pre>sake github:pages:migrate_website   # Migrates an existing website folder into a gh-pages branch, and links back as submodule
sake github:pages:setup             # Creates the gh-pages branch, and links to it as 'website' as submodule</pre>
<p>Since we've already created the website above, we're going to use the first task to migrate this folder into the required gh-pages branch.</p>
<pre>sake github:pages:migrate_website</pre>
<p>Um, and your done.</p>
<p>Note, if sake crashes and burns in your project it might be that you don't have a Rakefile. Try, "touch Rakefile" and rerun the sake command.</p>
<p>In 1-10 minutes your fancy new site will appear at <a href="http://drnic.github.com/macruby-tmbundle">http://username.github.com/projectname</a>. It even has a complimentary first blog post. You might want to change it to something useful.</p>
<p>You can now update your website via your website folder, commit changes and they automatically appear, automatically rendered via Jekyll, on your website. </p>
<h3>Disqus for comments</h3>
<p>Since your new website is static text there is no way to support comments on the blog posts. I've bundled into the theme's layouts the access code for Disqus. Like the image above, each blog post has Disqus comments at the bottom, and the sidebar shows the latest comments from all your blog posts.</p>
<p>You need to create a Disqus account, and <a href="http://disqus.com/add/">create a project</a> with the same name as your github project name. For example, if <code>jekyll_generator</code> is the project name on github, then make it the name on Disqus.</p>
<p><img alt="" src="http://img.skitch.com/20081221-1j37b58t1t69xxn8k2a3jx98q3.png" title="new disqus project" width="525" height="270" /></p>
<p>In my example above, my github project name was <code>jekyll_generator</code> but I couldn't use underscores on Disqus, so it is <code>jekyll-generator</code>. Fortunately, the generator templates already know this, and have converted your underscored name to hyphens already.</p>
<p>You can skip the "Choose your platform to install" steps as this is all done by the generator templates.</p>
<p>If you reload your project's website it should have Disqus badges on the sidebar, and the posts should have comment boxes.</p>
<h3>Lighthouse for tickets</h3>
<p>Lighthouse offers free access for open source projects to track their bugs. After you've created your Lighthouse project, you need to change the TODO values in <code>_layouts/default.html</code> and <code>_layouts/post.html</code> to your Lighthouse project number.</p>
<p><img alt="" src="http://img.skitch.com/20081221-f6fuha9emjecfuebbyncsaufm9.png" title="lighthouse url details" width="498" height="58" /></p>
<h3>Updating your website</h3>
<p>Your website now appears within your project source under the website folder. Though if you change it, add new posts, etc, you won't be able to commit the changes back normally. The contents of the website folder are effectively another git repository.</p>
<p>To commit changes to your website, go into the website folder and proceed normally:</p>
<pre>project(master) $ cd website
project/website(gh-pages) $ git commit -m "some changes"
project/website(gh-pages) $ git push origin gh-pages
project/website(gh-pages) $ cd ..
project(master) $</pre>
<p>Now your submodule may be dirty and need updating:</p>
<pre>git submodule update --init</pre>
<p>Not sure what this is all about.</p>
<h3>Summary</h3>
<p>A website is a great way to show that your pride and joy isn't ignored by new visitors and reminds existing users just how awesome the project is, and by clever association, how awesome you are.</p>
<p>A sexy website has to be even better.</p>
<p>Jekyll is great, and the Github Pages concept seems fun. Perhaps it wouldn't be necessary if the Github Wiki content was available as its own git repo, or if you could theme your project's source browser like a diry MySpace page.</p>
<p>Hopefully the sake tasks make migration of any existing websites to the Github Pages system easy peasy, and hopefully the jekyll_generator is useful for any new projects.</p>
<p>Hopefully.</p>
<p>Merry Christmas.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/' rel='bookmark' title='Permanent Link: Hacking someone&#8217;s gem with github and gemcutter'>Hacking someone&#8217;s gem with github and gemcutter</a> <small> Ever used a rubygem, found a bug, and just...</small></li><li><a href='http://drnicwilliams.com/2008/10/31/newgem-100-all-thanks-to-cucumber/' rel='bookmark' title='Permanent Link: newgem 1.0.0 all thanks to Cucumber'>newgem 1.0.0 all thanks to Cucumber</a> <small>The New Gem Generator (newgem) was exciting, moderately revolutionary, and...</small></li><li><a href='http://drnicwilliams.com/2008/08/19/my-attempt-at-sake-task-management/' rel='bookmark' title='Permanent Link: My attempt at sake task management'>My attempt at sake task management</a> <small> I&#8217;ve used sake intermittently in my workflow. It competes...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>How to yell at people with GitHub from TextMate</title>
		<link>http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/</link>
		<comments>http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/#comments</comments>
		<pubDate>Wed, 28 May 2008 05:48:59 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=276</guid>
		<description><![CDATA[Sometimes when you are perusing code you ask the question: why the hell is that there? or why does this even work?
Now you can instantly navigate from that erroneous line to the git commit where it was added, and then using github&#8217;s commenting system add a full-flavoured remark about that person&#8217;s code. I&#8217;m not sure [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/10/09/textmate-easter-egg-find-bundle-commands-by-key-combo/' rel='bookmark' title='Permanent Link: TextMate easter egg: find bundle commands by key combo'>TextMate easter egg: find bundle commands by key combo</a> <small>I&#8217;ve dreamed of the ability to ask TextMate &#8220;what frigging...</small></li><li><a href='http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/' rel='bookmark' title='Permanent Link: Using Ruby within TextMate snippets and commands'>Using Ruby within TextMate snippets and commands</a> <small>I didn&#8217;t know you could run Ruby within TextMate snippets....</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes when you are perusing code you ask the question: why the hell is that there? or why does this even work?</p>
<p>Now you can instantly navigate from that erroneous line to the git commit where it was added, and then using github&#8217;s commenting system add a full-flavoured remark about that person&#8217;s code. I&#8217;m not sure if profanity is against the GitHub Terms of Service, but I&#8217;d rather ask forgiveness than permission.</p>
<p><object width="550" height="393"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1077669&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1077669&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="393"></embed></object><br /><a href="http://www.vimeo.com/1077669?pg=embed&#038;sec=1077669">TextMate + GitHub &#8211; how to comment/discuss on a line via GitHub</a> from <a href="http://www.vimeo.com/user289979?pg=embed&#038;sec=1077669">Dr Nic</a> on <a href="http://vimeo.com?pg=embed&#038;sec=1077669">Vimeo</a>.</p>
<p>Download and installation instructions are <a href="http://github.com/drnic/github-tmbundle/">available in all good bookstores</a>.</p>
<h3>Just for TextMate?</h3>
<p>There is an editor for Windows &#8211; <a href="http://www.e-texteditor.com/">E-TextEditor</a> &#8211; that was designed to support TextMate bundles. So far, the GitHub bundle doesn&#8217;t use any special features of TextMate&#8217;s latest-and-greatest UI libraries, so it should be usable on E-TextEditor.</p>
<p>Also, a <a href="http://github.com/solars/github-vim/tree/master">VIM project</a> has been created to port the GitHub bundle, by Christoph Blank. Cristoph can be found hanging around #hobo on irc as &#8217;solars&#8217;, if you want more goodies in the VIM bundle.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/10/09/textmate-easter-egg-find-bundle-commands-by-key-combo/' rel='bookmark' title='Permanent Link: TextMate easter egg: find bundle commands by key combo'>TextMate easter egg: find bundle commands by key combo</a> <small>I&#8217;ve dreamed of the ability to ask TextMate &#8220;what frigging...</small></li><li><a href='http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/' rel='bookmark' title='Permanent Link: Using Ruby within TextMate snippets and commands'>Using Ruby within TextMate snippets and commands</a> <small>I didn&#8217;t know you could run Ruby within TextMate snippets....</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>GitHub and TextMate Unite</title>
		<link>http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/</link>
		<comments>http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/#comments</comments>
		<pubDate>Mon, 26 May 2008 07:30:16 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=275</guid>
		<description><![CDATA[I wanted to go from a source file to the equivalent file on github. I wanted a selection of lines in TextMate editor to also be selected when I was taken to github.com. I wanted to cut back on my senseless killing of innocent pasties. 
Finally, I wanted to make a nice little video to [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/10/09/textmate-easter-egg-find-bundle-commands-by-key-combo/' rel='bookmark' title='Permanent Link: TextMate easter egg: find bundle commands by key combo'>TextMate easter egg: find bundle commands by key combo</a> <small>I&#8217;ve dreamed of the ability to ask TextMate &#8220;what frigging...</small></li><li><a href='http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/' rel='bookmark' title='Permanent Link: Using Ruby within TextMate snippets and commands'>Using Ruby within TextMate snippets and commands</a> <small>I didn&#8217;t know you could run Ruby within TextMate snippets....</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I wanted to go from a source file to the equivalent file on github. I wanted a selection of lines in TextMate editor to also be selected when I was taken to github.com. I wanted to cut back on my senseless killing of innocent <a href="http://pastie.caboo.se">pasties</a>. </p>
<p>Finally, I wanted to make a nice <a href="http://www.vimeo.com/1066882">little video</a> to show off the new <a href="http://github.com/drnic/github-tmbundle">GitHub.tmbundle</a>.</p>
<p><object width="550" height="393"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1066882&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1066882&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="393"></embed></object><br /><a href="http://www.vimeo.com/1066882?pg=embed&amp;sec=1066882">TextMate and GitHub: Show the current file in GitHub</a> from <a href="http://www.vimeo.com/user289979?pg=embed&amp;sec=1066882">Dr Nic</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1066882">Vimeo</a>.</p>
<h2 id="which_remote_repository_is_it_choosing">Which remote repository is it choosing?</h2>
<p>If you have multiple remote references to github.com repositories, then the algorithm picks one in the following order:</p>
<ol>
<li>A remote named &#8216;github&#8217;</li>
<li>A remote named &#8216;origin&#8217;</li>
<li>The first remote for a github.com repository</li>
</ol>
<p>What else could go in a GitHub textmate bundle?</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/10/09/textmate-easter-egg-find-bundle-commands-by-key-combo/' rel='bookmark' title='Permanent Link: TextMate easter egg: find bundle commands by key combo'>TextMate easter egg: find bundle commands by key combo</a> <small>I&#8217;ve dreamed of the ability to ask TextMate &#8220;what frigging...</small></li><li><a href='http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/' rel='bookmark' title='Permanent Link: Using Ruby within TextMate snippets and commands'>Using Ruby within TextMate snippets and commands</a> <small>I didn&#8217;t know you could run Ruby within TextMate snippets....</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>GitHub Badge for your Blog with 100% guarantee of more coolness</title>
		<link>http://drnicwilliams.com/2008/05/03/github-badge-for-your-blog/</link>
		<comments>http://drnicwilliams.com/2008/05/03/github-badge-for-your-blog/#comments</comments>
		<pubDate>Sat, 03 May 2008 04:14:11 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=272</guid>
		<description><![CDATA[
The killer app for JavaScript in the 90s was to take a perfectly readable sequence of words &#8211; aka &#8220;a sentence&#8221; &#8211; and turn every single character a different colour. You did that, then you went back to doing normal work.
The killer app for JavaScript in the 00s is widgets/badges. Taking perfectly useful stuff from [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/' rel='bookmark' title='Permanent Link: How to yell at people with GitHub from TextMate'>How to yell at people with GitHub from TextMate</a> <small>Sometimes when you are perusing code you ask the question:...</small></li><li><a href='http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/' rel='bookmark' title='Permanent Link: GitHub and TextMate Unite'>GitHub and TextMate Unite</a> <small>I wanted to go from a source file to the...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://drnicjavascript.rubyforge.org/github_badge/"><img src="http://img.skitch.com/20080503-jdweqc5md718di54qn8mwjseec.jpg" alt="GitHub Badge" /></a></p>
<p>The killer app for JavaScript in the 90s was to take a perfectly readable sequence of words &#8211; aka &#8220;a sentence&#8221; &#8211; and turn every single character a different colour. You did that, then you went back to doing normal work.</p>
<p>The killer app for JavaScript in the 00s is widgets/badges. Taking perfectly useful stuff from one website &#8211; aka &#8220;data&#8221; &#8211; and re-posting it on your blog sidebar.</p>
<p>In both circumstances, across two decades, you did this to look cool. Sure, it never works but you do it anyway.</p>
<p>Thusly, riding high on the world-dominating success of GitHub there seems to be a vacancy in the department of &#8220;JavaScript badge for my blog to make me look cool&#8221; projects, in the sub-category of &#8220;GitHub&#8221;.</p>
<p>The first entrant and thus market leader of the &#8220;Blog Badges for GitHub&#8221; micro-industry is the &#8220;<a href="http://drnicjavascript.rubyforge.org/github_badge/">GitHub Badge</a>&#8221; It is beautifully demonstrated in static image form above, or if you click the image through to the website (or <a href="http://drnicwilliams.com">here</a> to my blog and its aesthetically appealing enhancement with said GitHub Badge) you&#8217;ll see it live and interactive. </p>
<p>Touch it. Feel it. Press the &#8220;Show more&#8221; link for hours of entertainment.</p>
<h3 id="installation">Installation</h3>
<p>Then get it for yourself. Read the <a href="http://drnicjavascript.rubyforge.org/github_badge/">GitHub Badge</a> website or just&#8230;</p>
<p>Slap the following into your blog sidebar:</p>
<pre>&lt;div id="github-badge"&gt;&lt;/div&gt;
&lt;script type="text/javascript" charset="utf-8"&gt;
  GITHUB_USERNAME="drnic";
  GITHUB_LIST_LENGTH=10;
  GITHUB_HEAD="div"; // e.g. change to "h2" for wordpress sidebars
&lt;/script&gt;
&lt;script src="http://drnicjavascript.rubyforge.org/github_badge/dist/github-badge-launcher.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<p>Only GITHUB_USERNAME is a required pre-set variable. The others above show the defaults, and can be changed by being specified.</p>
<p>For my WordPress sidebar, which uses <code>&lt;li&gt;</code> and <code>&lt;h2&gt;</code> for sections and headers, I use the following:</p>
<pre>&lt;li id="github-badge"&gt;&lt;/li&gt;
&lt;script type="text/javascript" charset="utf-8"&gt;
  GITHUB_USERNAME="drnic";
  GITHUB_HEAD="h2";
&lt;/script&gt;
&lt;script src="http://drnicjavascript.rubyforge.org/github_badge/dist/github-badge-launcher.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<p>Thus the badge is inserted in the <code>&lt;li&gt;</code> element, and the &#8220;My projects (drnic)&#8221; header is an <code>&lt;h2&gt;</code> instead of a <code>&lt;div&gt;</code>.</p>
<h3 id="source_and_tests_on_github">Source and tests on github</h3>
<p>You can fetch the source from github &#8211; <a href="http://github.com/drnic/github_badges/tree/master">http://github.com/drnic/github_badges/tree/master</a> &#8211; using:</p>
<pre>git clone git://github.com/drnic/github_badges.git
</pre>
<p>You might want to add an option to turn off the auto-CSS generator so you can theme it yourself.</p>
<p>The JavaScript tests are in <code>test/</code> folder. Either run them with <code>rake test</code>, or individually open the files in your browser.</p>
<h3 id="future_cool_things_the_badge_could_do8230">Future cool things the badge could do&#8230;</h3>
<p>Ultimately, when Chris Wanstrath (harass him on <a href="http://twitter.com/defunkt">twitter</a>) adds more fields and APIs to the <a href="http://github.com/guides/the-github-api">GitHub API</a> then the badge can do more. Currently it orders the projects in reverse order &#8211; that is, newest projects first. If I can get the network/watching counters then I can order the list using those values, etc. </p>
<p>Any other cool ideas for what the badge could do?</p>
<p>I&#8217;d like to be able to show project version numbers (e.g. gem version numbers) and other project meta-information. This would require GitHub to offer a CRUD UI for generic key/values and for the fields to be returned via their API.</p>
<p>If you know Chris and can throw heavy objects at him with moderate certainty of hitting him and not damaging any expensive equipment, please do so til he gives me this stuff.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/' rel='bookmark' title='Permanent Link: How to yell at people with GitHub from TextMate'>How to yell at people with GitHub from TextMate</a> <small>Sometimes when you are perusing code you ask the question:...</small></li><li><a href='http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/' rel='bookmark' title='Permanent Link: GitHub and TextMate Unite'>GitHub and TextMate Unite</a> <small>I wanted to go from a source file to the...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/05/03/github-badge-for-your-blog/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Git for Rubyforge accounts</title>
		<link>http://drnicwilliams.com/2008/04/08/git-for-rubyforge-accounts/</link>
		<comments>http://drnicwilliams.com/2008/04/08/git-for-rubyforge-accounts/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 02:27:33 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[RubyForge]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=271</guid>
		<description><![CDATA[
First there was CVS, then came SVN to RubyForge. Actually, I&#8217;m guessing that CVS was the sole SCM initially, and SVN was added later. I just can&#8217;t imagine them starting RubyForge from scratch and explicitly saying &#8220;yeah we&#8217;ll offer CVS because &#8230;&#8221;. I don&#8217;t know how that sentence would have finished. It must have been [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/' rel='bookmark' title='Permanent Link: GitHub and TextMate Unite'>GitHub and TextMate Unite</a> <small>I wanted to go from a source file to the...</small></li><li><a href='http://drnicwilliams.com/2008/02/03/using-git-within-a-team/' rel='bookmark' title='Permanent Link: Using Git within a project (forking around)'>Using Git within a project (forking around)</a> <small> In Star Wars, when Grand Moff Tarkin orders the...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://img.skitch.com/20080408-xctb9unkcxca75p5m7sk12dxn7.jpg" alt="rubyforge has git - account creation" /></p>
<p>First there was CVS, then came SVN to <a href="http://rubyforge.org">RubyForge</a>. Actually, I&#8217;m guessing that CVS was the sole SCM initially, and SVN was added later. I just can&#8217;t imagine them starting RubyForge from scratch and explicitly saying &#8220;yeah we&#8217;ll offer CVS because &#8230;&#8221;. I don&#8217;t know how that sentence would have finished. It must have been added first. There is no valid &#8220;because &#8230;&#8221;.</p>
<p>But now, with each RubyForge project there is a Git repository. This is great for two very good reasons:</p>
<ol>
<li>the end is nigh for empty or unmaintained SVN repositories</li>
<li>less <a href="http://toolmantim.com/article/2008/3/31/moving_on_from_centralised_decentralised_development_or_whats_after_github_and_gitorious">centralised decentralised development</a>
</li>
</ol>
<p><a href="http://github.com">GitHub</a> + <a href="http://gitorious.com">Gitorious</a> are the go-to-guys for somewhere to hang your proverbial hat: somewhere you push your local git repository to so other people can access it.</p>
<p>Yet when I&#8217;m investigate someone&#8217;s new RubyGem or other project, the first place I look for its source is RubyForge. I assume the project name is the same as the gem name, and goto <a href="http://rubyforge.org/projects/pastiepacker">http://rubyforge.org/projects/pastiepacker</a> for example. </p>
<p><a href="http://rubyforge.org/scm/?group_id=5957"><img src="http://img.skitch.com/20080408-pf3yi3g7hty11a34t7pf2qsgxt.jpg" alt="rubyforge scm link" /></a></p>
<p>Then I click on the SCM tab. Normally this gives SVN instructions. In this modern era, many projects SVN repos can now be blank or unmaintained with Git repos being preferred by many. </p>
<p>So, the reason to push your git repository to RubyForge&#8217;s new git system is to make life easier for me. I mean, I don&#8217;t know who else clicks on the SCM link, but I do. </p>
<p>While this is all well and great for new projects &#8211; you can select &#8220;git&#8221; instead of &#8220;svn&#8221; as per the first image above &#8211; but I&#8217;m not yet sure how to migrate old projects [<a href="http://rubyforge.org/tracker/index.php?func=detail&#038;aid=19355&#038;group_id=5&#038;atid=102">follow support ticket</a>].</p>
<p>The other reason is to actually help your distributed repository be distributed. Push it to github. Push it to gitorious. And now you can push it to rubyforge. Sweet.</p>
<h3>Adding another remote repository</h3>
<p>Since your default remote repository is probably called &#8220;origin&#8221;, you may wonder how such a naming schema could ever expand to multiple remote repositories? Might I suggest &#8220;rubyforge&#8221; as the name of the rubyforge repository?</p>
<pre>git remote add rubyforge gitosis@rubyforge.org:pastiepacker.git
git push rubyforge master
git push origin master
</pre>
<p>If you do this for all your projects, perhaps a bash script is in order:</p>
<pre>function gpall() {
  git push rubyforge master
  git push origin master
}
</pre>
<h3>One project equals one repository, but multiple packages</h3>
<p>Using a Rubyforge project&#8217;s git repository might be problematic where you release multiple packages/rubygems (<a href="http://rubyforge.org/projects/codeforpeople">codeforpeople</a>, <a href="http://rubyforge.org/projects/seattlerb">seattlerb</a>, <a href="http://rubyforge.org/projects/mongrel">mongrel</a>, <a href="http://rubyforge.org/projects/drnicutilities">drnicutilities</a>, etc). Here I&#8217;d prefer one repository per package, rather than one repository for the whole &#8220;project&#8221;. </p>
<p>Perhaps you could push the master branch from your local repository for each package into different branches of the rubyforge git repository. Thoughts?</p>
<h3>Can&#8217;t push to your rubyforge git repo?</h3>
<p><a href="http://rubyforge.org/docman/view.php/5/460/faq.html#git_push_without_key">From the FAQ</a>:</p>
<blockquote><p>RubyForge Git repositories are managed via gitosis; gitosis does authentication via public keys. This means that in order to push to a RubyForge Git repository you&#8217;ll need to upload a public key to your account &#8211; see notes on that here.</p>
<p>Generally, Git support is something we&#8217;ve just introduced, so feedback about it on the forums would be quite welcome. </p></blockquote>
<h3>What is Pastie Packer?</h3>
<p><a href="http://pastiepacker.rubyforge.org">I can&#8217;t tell you. Its a secret.</a></p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/' rel='bookmark' title='Permanent Link: GitHub and TextMate Unite'>GitHub and TextMate Unite</a> <small>I wanted to go from a source file to the...</small></li><li><a href='http://drnicwilliams.com/2008/02/03/using-git-within-a-team/' rel='bookmark' title='Permanent Link: Using Git within a project (forking around)'>Using Git within a project (forking around)</a> <small> In Star Wars, when Grand Moff Tarkin orders the...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/04/08/git-for-rubyforge-accounts/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Using Git within a project (forking around)</title>
		<link>http://drnicwilliams.com/2008/02/03/using-git-within-a-team/</link>
		<comments>http://drnicwilliams.com/2008/02/03/using-git-within-a-team/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 23:11:11 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2008/02/03/using-git-within-a-team/</guid>
		<description><![CDATA[

In Star Wars, when Grand Moff Tarkin orders the destruction of the planet Alderaan, you must question his motivations. Historically, I think too much emphasis has been placed on &#8220;he&#8217;s an Evil Warlord doing the bidding of Darth Vader and the Emperor&#8221;, and &#8220;the Rebel scum must be tortured and punished.&#8221; But I&#8217;m not so [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/' rel='bookmark' title='Permanent Link: Hacking someone&#8217;s gem with github and gemcutter'>Hacking someone&#8217;s gem with github and gemcutter</a> <small> Ever used a rubygem, found a bug, and just...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/08/19/my-attempt-at-sake-task-management/' rel='bookmark' title='Permanent Link: My attempt at sake task management'>My attempt at sake task management</a> <small> I&#8217;ve used sake intermittently in my workflow. It competes...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<div>
<img style="float: right" src="http://upload.wikimedia.org/wikipedia/en/f/f9/Death_star1.png" alt="Death Star - as seen on TV" /></p>
<p>In Star Wars, when Grand Moff Tarkin orders the destruction of the planet Alderaan, you must question his motivations. Historically, I think too much emphasis has been placed on &#8220;he&#8217;s an Evil Warlord doing the bidding of Darth Vader and the Emperor&#8221;, and &#8220;the Rebel scum must be tortured and punished.&#8221; But I&#8217;m not so sure this is the whole picture.</p>
<p>As developers, we know how exciting it is for a project/website to &#8220;go live&#8221;. You&#8217;ll get some praise from users, some bugs reports, but mostly, you will get the thrill of having finished something and seen it in action.
</p></div>
<p>I&#8217;ve got to believe that when Tarkin gave the orders to &#8220;open up the taps on this baby,&#8221; there was a very different emotion at work amongst all his outwards &#8220;Give in to the Empire, Princess Leia&#8221; soapboxing. After flying around the emptiness of space in his brand new Death Star, never having actually used its main weapon, he just wanted to see if the thing actually worked.</p>
<p>If George Lucas hadn&#8217;t cut away from the cockpit of the Death Star to show us the planet Alderaan being obliterated, I guarantee you that Tarkin was waving his arms in the air, yelling &#8220;Oh that&#8217;s what I&#8217;m talkin&#8217; &#8217;bout,&#8221; with his lackies were all high-fiving each other in the background.</p>
<p>This brings me to Git. </p>
<p>Since moving the development of the Rails TextMate bundle to a <a href="http://github.com/drnic/ruby-on-rails-tmbundle/tree/two_point_ooh">git repository</a>, several people have forked the repository.</p>
<p>When I pulled in the first &#8220;patch&#8221; from one of the forked repositories, I finally felt I&#8217;d &#8220;opened up the taps&#8221; on git. It was a sweet feeling.</p>
<p>Whilst Git was created by Linus for managing the Linux project, I get the feeling that Git&#8217;s raison d&#8217;être was to manage TextMate bundles. Weird since Linus probably doesn&#8217;t use TextMate.</p>
<p>A TextMate bundle is a combination of common/default snippets and personal snippets. Those personal snippets may even be useful for other people. Other people way want them. They may even join the set of default snippets.</p>
<p>Git&#8217;s system of forked repositories makes all this a reality. In a different, subversion-tainted reality, this scenario would mean that your local subversion checkout of the bundle becomes a mess of modified files and patch requests. With Git, you can stop caring about the central SCM. You make your own local changes, you push them to your own remote fork of the repository, and if they get absorbed into the common/default/central bundle so be it.</p>
<p>As I&#8217;m to understand it, this workflow is to Git as destroying planets is to the Death Star. Both Git and the Death Star are technologically impressive and to associate with them is to be seen as &#8220;cool&#8221;, but they can both do so much more.</p>
<h3>Forking and Cloning</h3>
<p>I&#8217;m not sure if I&#8217;m using official vocabulary, but I think of &#8220;forking&#8221; and &#8220;cloning&#8221; as different and I&#8217;ll use these terms until I&#8217;m educated otherwise.</p>
<p><strong>Cloning</strong> is to make a copy of a remote repository into your local development environment. Your work machine. With the exception of IM, bittorrent and your shared iTunes library, that FTP server you don&#8217;t know is running, etc, no one&#8217;s got access to this machine or your clone.</p>
<p>You can make changes to your clone. For the TM bundles you could create a new snippet etc. You can then add and commit those changes into your local Git clone. They are committed now like a normal subversion repository commit. Except only you have them.</p>
<p>You could share the changes with a patch. You create the patch, then email it or upload it to wherever patches are uploaded to for your project.</p>
<p>Alternatively, you can push your changes to remote repositories (see &#8220;fork&#8221; below). If you have commit access to the original repository you cloned, you&#8217;d probably push your commits to this repository. If you don&#8217;t have commit rights, then you can fork the repository and push your commits there. &#8220;Freeeeeedooooom!!!&#8221; cried William Wallace whilst simultaneously having his Scottish testicles <a href="http://en.wikipedia.org/wiki/Emasculation">emasculated</a>.</p>
<p><strong>Forking</strong> is to clone an entire remote repository into another remote repository. Now you have two repositories based around the same code base. At that one point in time, they have the same set of files and the same history of changes.</p>
<p>As suggested above, you might do this because you don&#8217;t have commit rights to another fork, or because you are literally doing just as the name suggests: forking the project and going your own way. Either a moderate or radically different direction.</p>
<p>This is exactly what is wonderful about Git with TextMate bundles &#8211; there is no &#8220;one true path&#8221;.</p>
<p>If you wanted to fork the Rails TM bundle that I&#8217;ve hosted on github into another repository hosted on github then you click the &#8220;fork&#8221; button. [Email me for for the secret "I want to help make TM Rails Bundle awesome" github password if you need it to create an account]</p>
<div class="thumbnail"><a href="http://skitch.com/drnic/fsh9/drnics-ruby-on-rails-tmbundle-at-two-point-ooh-github"><img src="http://img.skitch.com/20080202-ta6gwahjat91chu9btcpya89jj.preview.jpg" alt="drnic's ruby-on-rails-tmbundle at two_point_ooh 2014 GitHub" /></a></div>
<p>Alternately you could fork and host your repository on any public git server. <a href="http://d.strelau.net/">Dean Strelau</a> <a href="http://gitorious.org/projects/ruby-on-rails-tmbundle">forked it</a> onto Gitorious. You could also fork it onto gitorious.org, you&#8217;ll just need to give it a different name; e.g. prefix/suffix your name.</p>
<h3>&#8220;In the end, there can be only one&#8221;</h3>
<p>No. No one needs to have their head cut off, <a href="http://en.wikipedia.org/wiki/Highlander_(film)">Highlander</a>-style, with Git. I mean, unlike Subversion, Git doesn&#8217;t force any organisational behaviour. All commits don&#8217;t have to make their way back into one &#8220;root&#8221; repository.</p>
<p>But, once you have committed changes to your fork you might like to let other forkers know about them; especially if there is one repository that is commonly known as the &#8220;root&#8221; repository. For the TM Rails bundle it would be <a href="http://github.com/drnic/ruby-on-rails-tmbundle/tree/two_point_ooh">my repository</a> since I&#8217;ll then aggregate changes and push them down to the official Subversion repository and from there they get pushed out with future TextMate releases.</p>
<p>For the <a href="http://rubini.us/">Rubinius</a> project, you&#8217;d probably want all your commits investigated and pulled into Evan Pheonix&#8217;s personal git clone. He&#8217;s not good looking enough to just be a poster boy so I assume he knows how to build and distribute the project for download.  </p>
<p>I&#8217;m not sure what the organisation hierarchy of evil that is being built around the Rubinius project, but you can probably post a notification of your commits and your repository URL to the Rubinius <a href="http://rubinius.lighthouseapp.com">lighthouse tracker</a>. Don&#8217;t have a fork? Just submit patch files. Already have commit rights to Evan&#8217;s repository? Push directly to it. </p>
<p>Three different ways to contribute. Which one to use? The organisation of the project decides. Rubinius has a <a href="http://rubini.us/contribute">how to contribute</a> page.</p>
<p>For the Rails TextMate bundle project, the preferred way to contribute is either patch files from your local clone, or to fork the project and let me know of your fork URL. Discussion of the project happens on the <a href="http://groups.google.com/group/rubyonrails-textmate">Google Group</a>.</p>
<p>So, once your project has multiple forks floating around &#8211; how do you as a project maintainer pull in the commits contributed by others?</p>
<h3>How to pull friends and influence people</h3>
<p>Let&#8217;s continue with the example of Dean&#8217;s fork of the TM bundle. After he forked it, he used the <a href="http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/">previous article&#8217;s instructions</a> to clone his own fork, rather than my repository. To you, once you&#8217;ve forked a repository, then your repository is your git &#8220;origin&#8221; and the original repository you forked just becomes a fork to pull from when you want to synchronise your repositories. Make sense? Thought so.</p>
<p>Put another way, if you don&#8217;t fork my TextMate repository rather you just clone it and modify it, then your &#8220;origin&#8221; will be my repository. You&#8217;ll then contribute by emailing patch files.</p>
<p>Or you can fork my repository and then you clone this new repository locally. This new repository is your &#8220;origin&#8221;. You contribute by committing changes locally and pushing them to your origin (your fork). I then investigate them (see below), and merge them into my repository if I feel like it (gifts help too).</p>
<p>So, Dean&#8217;s got a fork. He&#8217;s cloned it locally, made changes, committed them locally and pushed them out to his fork. I know I&#8217;ve said the three times, but it confused the crap out of me so I think its worth repeating&#8230; a lot.</p>
<p>Now how do I pull in Dean&#8217;s commits into my local clone, investigate them, and then merge them into my repository? I&#8217;m glad you asked.</p>
<p>From within my local clone:</p>
<pre>
git checkout two_point_ooh
git remote add strelau git://gitorious.org/ruby-on-rails-tmbundle/mainline.git
git checkout -b strelau/two_point_ooh
git pull strelau two_point_ooh
</pre>
<p>The first line changes my local clone into the &#8220;two_point_ooh&#8221; branch. Dean has told me that he has made his commits into his own two_point_ooh branch. So, my own two_point_ooh branch is the closest so I&#8217;ll start here. Its probably irrelevant which branch you start with. Perhaps.</p>
<p>The second line stores the information about Dean&#8217;s fork into my .git/config file. I&#8217;ve given the fork a label &#8220;strelau&#8221;, to differentiate it from my own remote repository &#8220;origin&#8221;.</p>
<p>The third line creates a new branch of my local repository. This branch will not be pushed up into my remote repository later on, rather its just for my own personal collection. The name of this branch is arbitrary. I could call it &#8220;ginger_beer_cordial&#8221;, but &#8220;strelau/two_point_ooh&#8221; is more meaningful. &#8220;strelau&#8221; to remind me which fork I should pull from, and &#8220;two_point_ooh&#8221; to remind me which branch of &#8220;strelau&#8221; to pull from.</p>
<p>Note, you are best to run this &#8220;git checkout -b name&#8221; operation from within another branch that most closely matches the contents you are about to pull in. That&#8217;s why I did the first line &#8211; to change into my own two_point_ooh branch first.</p>
<p>The fourth line pulls down any changes from Dean&#8217;s two_point_ooh branch into the current branch &#8211; strelau/two_point_ooh. That is, you now have a copy of it locally.</p>
<p>UPDATE: I really think this needs a good diagram here to explain the existance of two remote repositories, and within the local clone, the existance of two branches: two_point_ooh, and strelau/two_point_ooh. Plus there&#8217;ll be other branches in the local clone: master, origin/master (my remote version), origin/two_point_ooh (my remote version that I&#8217;ll push too when I&#8217;ve merged in Dean&#8217;s changes).</p>
<p>I can now investigate his commits. <code>gitk</code> is a fun tool to see the various branches and differences. It also shows the unique SHA1 codes for each commit, if you want to cherry pick changes rather than merge all of Dean&#8217;s changes into your own code.</p>
<p>Later, when Dean has more commits to offer the world, I&#8217;ll just run:</p>
<pre>
git checkout strelau/two_point_ooh
git pull strelau two_point_ooh
</pre>
<p>See how the name of &#8220;Dean&#8217;s branch&#8221; helps remember what the &#8220;git pull&#8221; command is? TIP: Give meaningful name to remote branches.</p>
<h3>What now?</h3>
<p>Once you&#8217;ve pulled down someone else&#8217;s remote branch (from their fork) it is just another local branch. You can explore it in <code>gitk</code> and see how it compares to other branches, for example.</p>
<div class="thumbnail"><a href="http://skitch.com/drnic/fs91/gitk-ruby-on-rails.tmbundle"><img src="http://img.skitch.com/20080202-mkd4sdnpqb4d8cre3188cquhi2.preview.jpg" alt="gitk: Ruby on Rails.tmbundle" /></a></div>
<p>But what you&#8217;ll ultimately want to do is merge some/all of Dean&#8217;s commits into your branch, commit them, and push them out to your remote repository. If you have the &#8220;central&#8221; repository then this is akin to &#8220;accepting a patch&#8221;.</p>
<p>This process is now basic Git. Like driving the Death Star. Boring, and described elsewhere. Go back to your own branch, merge changes over, and push out to remote repo.</p>
<p>And now, Dean&#8217;s changes are in my remote repo:</p>
<div class="thumbnail"><a href="http://skitch.com/drnic/fayt/commit-history-for-drnics-ruby-on-rails-tmbundle-github"><img src="http://img.skitch.com/20080202-cuiwkj66nyrhh16pmyuwyd3xgy.preview.jpg" alt="Commit History for drnic's ruby-on-rails-tmbundle 2014 GitHub" /></a></div>
<p>And my gitk now show&#8217;s I&#8217;m sweet:</p>
<div class="thumbnail"><a href="http://skitch.com/drnic/fay1/gitk-ruby-on-rails.tmbundle"><img src="http://img.skitch.com/20080202-cqjky347iiidjrmk97rye7h8mh.preview.jpg" alt="gitk: Ruby on Rails.tmbundle" /></a></div>
<h3>But what about Dean?</h3>
<p>That&#8217;s like caring about the people on Alderaan&#8230;</p>
<p>What I mean to say is&#8230; Dean can now pull in my remote &#8220;two_point_ooh&#8221; branch into his local &#8220;two_point_ooh&#8221; branch. He may or may not like what I did to it. </p>
<p>I guess Dean and the people of Alderaan can blog about that one&#8230;</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/' rel='bookmark' title='Permanent Link: Hacking someone&#8217;s gem with github and gemcutter'>Hacking someone&#8217;s gem with github and gemcutter</a> <small> Ever used a rubygem, found a bug, and just...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/08/19/my-attempt-at-sake-task-management/' rel='bookmark' title='Permanent Link: My attempt at sake task management'>My attempt at sake task management</a> <small> I&#8217;ve used sake intermittently in my workflow. It competes...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/02/03/using-git-within-a-team/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Get ready for the TextMate &#8220;Trundle to Rails 2.0 Bundle&#8221;</title>
		<link>http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/</link>
		<comments>http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 03:11:59 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/</guid>
		<description><![CDATA[

Have you noticed lately that the Rails TextMate git pull origin two_point_oohbundle (also installed with e &#8211; the Text Editor for Windows) isn&#8217;t quite as helpful as it once was &#8211; guiding and amplifying your rails app development.

Your resourceful/restful rails apps are now filled with named routes, but none of the helpers (link_to, redirect_to, etc) [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/03/15/using-coffeescript-in-rails-and-even-on-heroku/' rel='bookmark' title='Permanent Link: Using CoffeeScript in Rails and even on Heroku'>Using CoffeeScript in Rails and even on Heroku</a> <small>I&#8217;m pretty excited about CoffeeScript as a clean-syntax replacement for...</small></li><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<div>
<a style="float: right; padding: 5px" href='http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/attachment/257/' rel='attachment wp-att-257' title='logo_bundle.png'><img src='http://drnicwilliams.com/wp-content/uploads/2008/01/logo_bundle.png' alt='logo_bundle.png' /></a></p>
<p>Have you noticed lately that the Rails <a href="http://macromates.com">TextMate</a> git pull origin two_point_oohbundle (also installed with <a href="http://www.e-texteditor.com/">e &#8211; the Text Editor</a> for Windows) isn&#8217;t quite as helpful as it once was &#8211; guiding and amplifying your rails app development.
</div>
<p>Your resourceful/restful rails apps are now filled with named routes, but none of the helpers (link_to, redirect_to, etc) use them. The default view template was still <code>rhtml</code> for a long time (latest svn trunk fixes this to be <code>html.erb</code>, though Marc Jeanson is having a crack at supporting both through a per-project config file). </p>
<p>Or perhaps you were hoping for some snippets for new features of Rails 2.0: assert_difference (asd), assert_select (ass), respond_to (rst). </p>
<p><strong>Or just maybe, you&#8217;ve been updating your local bundle to Rails 2.0 already?</strong> Please say yes, please say yes. If you are saying &#8220;yes&#8221;, read at the bottom for how/where to send me the patches. If you are saying &#8220;no&#8221;, read at the bottom for how/where to start creating patches and sending them to me.</p>
<h3>Firstly, DHH didn&#8217;t write the Rails bundle</h3>
<p>I didn&#8217;t know this &#8211; I just assumed the guy who created Rails and helped promote TextMate also created the Ruby on Rails TextMate bundle. Instead if was WWF&#8217;s &#8220;The Rock&#8221; himself <a href="http://blog.inquirylabs.com/category/software-engineering/">Duane Johnson</a> (figurines sold separately, and may look different to the real Duane Johnson who writes Rails code instead of prancing around in his underpants with other adult males in confined spaces).</p>
<p>The TextMate SVN logs say that it the bundle was first committed in Jan 2005. Its now Jan 2008. That&#8217;s three years of maintaining a suite of code that thousands of people take for granted every day writing Rails code. What a champion.</p>
<p>Like the Australian Cricket team&#8217;s wicketkeeper, <a href="http://en.wikipedia.org/wiki/Adam_Gilchrist">Adam Gilchrist</a>, he&#8217;s also retiring at the top of his game.</p>
<h3>New Maintainer&#8230; me</h3>
<p>Instead of maintaining my own projects, I&#8217;ve decided to maintain this one. I love the TextMate bundles. Before I had a Mac, I <a href="http://drnicwilliams.com/category/radrails/">ported them across to RadRails</a> and many RadRailers entered a golden era of snippet happiness.</p>
<p>My bundle-fu may not be the equivalent of Bruce Lee, but I&#8217;m keen to see my favourite Rails tool live on strong.</p>
<h3>Bleeding edge bundle</h3>
<p>Whilst the TextMate SVN administrators process the maintainer change request (Allan is on holidays somewhere and he took the house keys with him), you might think all is lost!</p>
<p>Never. </p>
<p>The straight-off-the-cow bleeding edge Rails bundle can be accessed via Git. Specifically the branch <a href="http://github.com/drnic/ruby-on-rails-tmbundle/tree/two_point_ooh">two_point_ooh</a>.</p>
<p>So, let&#8217;s all do away with our pre-existing Rails bundle and live on the edge.</p>
<pre>
cd ~/"Library/Application Support/TextMate/Bundles/"
mv "Ruby on Rails.tmbundle" "RoR.tmbundle.orig"
git clone git://github.com/drnic/ruby-on-rails-tmbundle.git "Ruby on Rails.tmbundle"
cd "Ruby on Rails.tmbundle"
git checkout --track -b two_point_ooh origin/two_point_ooh
git pull
</pre>
<p>Now, back in TextMate, go to menu &#8220;Bundles&#8221; > &#8220;Bundle Editor&#8221; > &#8220;Reload Bundles&#8221;.</p>
<p>You, my friend, are sitting pretty.</p>
<h3>Upgrading to when newer blood is on the bleeding edge</h3>
<p>Coming back for more?</p>
<pre>
cd ~/"Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle"
git checkout two_point_ooh  # optional; only if you changed to another branch etc
git pull
</pre>
<p>Now, back in TextMate, go to menu &#8220;Bundles&#8221; > &#8220;Bundle Editor&#8221; > &#8220;Reload Bundles&#8221;.</p>
<p>Bathe yourself in glory. Splash it all over yourself.</p>
<h3>Submitting patches</h3>
<p>If you go into TextMate, launch the Bundle Editor (Cmd+Alt+Ctrl+B) and change something in the Ruby on Rails bundle, then files will added/changed within your local git clone. </p>
<p>What I mean is, you can very simply submit patches now. [When I say "simply", I mean, "I think this is the best approach but I could be completely wrong here..."] Git is so cool that I don&#8217;t know what its doing most of the time; but let&#8217;s hang in there as a team.</p>
<pre>
cd ~/"Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle"
git add .   # to add any new files/snippets/commands you created; TextMate uses one file per snippet
git commit -a -m "Useful message about this patch goes here"
git diff -p HEAD^ HEAD
</pre>
<p>[Theoretically] this creates a patch based on your most recent commit. So you can easily create patches for changes even if your repository and the remote/central/bleeding edge repository look different.</p>
<p>If your patch was created over several commits, then replace HEAD^ with HEAD~4, if there were 4 commits.</p>
<p>I think. God I could be wrong about this though.</p>
<p>Just try your best and if it works, let me know and I&#8217;ll remove all this &#8220;I don&#8217;t know what I&#8217;m talking about&#8221; text and future readers will think I know everything. Web 2.0 rocks.</p>
<h3>Send patches to&#8230;</h3>
<p>Me <a href="mailto:drnicwilliams@gmail.com">drnicwilliams@gmail.com</a> <strong>[update] </strong>or via the <strong>new</strong> <a href="http://groups.google.com/group/rails-textmate">Google Group</a>.</p>
<p><strong>Update:</strong> Note there is a new Google Group (<a href="http://groups.google.com/group/rubyonrails-textmate">rails-textmate</a>) created in Feb 2009 due to Spam and loss of admin control on original group.</p>
<p>Want to fork the git repo? Use a free account at <a href="http://gitorious.org/">Gitorious</a> or <a href="http://github.com">GitHub</a>.</p>
<table style="background-color: #fff; padding: 5px;" cellspacing=0>
<tr>
<td>
  <img src="http://groups.google.com/groups/img/3nb/groups_bar.gif" height=26 width=132 alt="Google Groups">
  </td>
</tr>
<tr>
<td style="padding-left: 5px;font-size: 125%">
  <b>Ruby on Rails: TextMate</b>
  </td>
</tr>
<tr>
<td style="padding-left: 5px">
  <a href="http://groups.google.com/group/rails-textmate">Visit this group</a>
  </td>
</tr>
</table>
<h3>Trundle to Rails 2.0 Bundle</h3>
<p>Arguably, we just keep patching the bundle forever and bleeding edges will continue to live happily within the blood and muck of said existence.</p>
<p>But, lots of other people want nicely zipped up bundles. No doubt &#8220;e &#8211; the Text Editor&#8221; will want a &#8220;released&#8221; version so they can clean it of all the ugly things they can&#8217;t yet replicate like Macros. And eventually I&#8217;ll push it all down to the SVN repo and it will be released with future TextMate upgrades.</p>
<p>So, there will be a &#8220;Rails 2.0 compatible&#8221; grand opening one day soon. Probably before 14th of March 2008, when I&#8217;m giving a &#8220;What&#8217;s new in Rails 2.0?&#8221; talk at QCON London. Showing off the new bundle will be sweet. </p>
<p>That gives us 6 wks to refactor this bundle to make it a shining example of all that is wonderful in Rails 2.0. Every patch helps.</p>
<p>[Please consider Rails 1.2.6 and before developers when conceiving of patches, and please consult your doctor if pain persists.]</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/03/15/using-coffeescript-in-rails-and-even-on-heroku/' rel='bookmark' title='Permanent Link: Using CoffeeScript in Rails and even on Heroku'>Using CoffeeScript in Rails and even on Heroku</a> <small>I&#8217;m pretty excited about CoffeeScript as a clean-syntax replacement for...</small></li><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/feed/</wfw:commentRss>
		<slash:comments>62</slash:comments>
		</item>
		<item>
		<title>Going offline without your favourite Subversion repository?</title>
		<link>http://drnicwilliams.com/2007/11/22/going-offline-without-your-favourite-subversion-repository/</link>
		<comments>http://drnicwilliams.com/2007/11/22/going-offline-without-your-favourite-subversion-repository/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 05:01:46 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2007/11/22/going-offline-without-your-favourite-subversion-repository/</guid>
		<description><![CDATA[UPDATE: useful gitify command below.
All my client projects are hosted on Subversion repos. All my OSS projects are hosted on Rubyforge Subversion repos.
And tomorrow I head off for the 2nd &#8220;no internet&#8221; RailsCamp megafest, being held outside of Melbourne. From what I heard about the 1st one, it involved a lot of Guitar Hero II [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE</strong>: useful <code>gitify</code> command below.</p>
<p>All my client projects are hosted on Subversion repos. All my OSS projects are hosted on Rubyforge Subversion repos.</p>
<p>And tomorrow I head off for the 2nd &#8220;no internet&#8221; <a href="http://wiki.railscamp07.org/railscamp07/">RailsCamp megafest</a>, being held outside of Melbourne. From what I heard about the 1st one, it involved a lot of Guitar Hero II and beer. This weekend I&#8217;m promised that someone is bringing a Wii &#8211; dear God I do love the tennis game.</p>
<p>Like MacDonalds burgers and Veganism, if there are two things that don&#8217;t go together its Subversion and &#8220;No Internet&#8221;.</p>
<p>Fortunately, for all RailsCampers, there is a solution to your fears that you won&#8217;t be able to hack on your favourite project, and will be forced into playing Guitar Hero II/III and/or the Wii for the whole weekend.</p>
<p><a href="http://git.or.cz/">Git</a>.</p>
<p>Specifically, the <a href="http://www.kernel.org/pub/software/scm/git/docs/v1.5.3/git-svn.html">git-svn</a> command.</p>
<p>More specifically, follow the following steps:</p>
<ol>
<li><code>git-svn clone &lt;your svn url&gt; projectname.git</code></li>
<li>Go camping for the weekend.</li>
<li>Commit changes with <code>git commit -a -m "hahaha I'm camping and working - doh!"</code></li>
<li>Come home from camping.</li>
<li><code>git-svn rebase</code> to re-import any SVN changes that might have been committed whilst you were away. If there are conflicts, just follow the instructions.</li>
<li><code>git-svn dcommit</code> and your svn repository will be updated with all your fancy changes; no one will ever know you used Git.</li>
</ol>
<h2>Installing Git</h2>
<p>I remember having problems getting <code>git-svn</code> to run because the default path to the perl cmd is crap, and you need to specify <code>PERL_PATH='/usr/bin/env perl'</code>, I think, before installation.</p>
<p>For MacPorts etc, its <code>sudo port install git-core</code>. I think the reason its not just called &#8216;git&#8217; is to remind you that you know nothing about git. Which is fair. You don&#8217;t if you don&#8217;t know how to install it, I guess.</p>
<p>From source, get the tarball from the <a href="http://git.or.cz/">home page</a>.</p>
<p>For Windows, use <a href="http://www.cygwin.com/">cygwin</a>.</p>
<h2>Gitify command</h2>
<p>Want a utility cmd to create a Git repo in the parent folder of a Subversion project? That is, go to your Rails app that is checked out from a Subversion repo, and run <code>gitify</code>, and you will have a <code>foldername.git</code> folder in the parent folder.</p>
<p>Stick this code into ~/bin/gitify and add ~/bin to your path:</p>
<textarea name="code" class="ruby" cols="60" rows="10">
#!/usr/bin/env ruby -wKU

# get svn info location
svnurl = `svn info | grep "^URL:"`.gsub('URL: ','').chomp

# project = basename
project = File.basename(Dir.pwd)

puts cmd = "git-svn clone #{svnurl} ../#{project}.git"

`#{cmd}`
</textarea>
]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2007/11/22/going-offline-without-your-favourite-subversion-repository/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>
