<?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>Kyle Cordes &#187; source-control</title>
	<atom:link href="http://kylecordes.com/tag/source-control/feed" rel="self" type="application/rss+xml" />
	<link>http://kylecordes.com</link>
	<description>Software, Business, and Life</description>
	<lastBuildDate>Fri, 18 Nov 2011 13:01:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>What is the Best Git GUI (Client) for Windows?</title>
		<link>http://kylecordes.com/2010/git-gui-client-windows</link>
		<comments>http://kylecordes.com/2010/git-gui-client-windows#comments</comments>
		<pubDate>Mon, 23 Aug 2010 16:37:50 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[source-control]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://kylecordes.com/?p=716</guid>
		<description><![CDATA[I adopted Git as my primary source control tool a couple of years ago, when I was using Windows as my primary (90%) desktop OS. Since then I’ve switched to 75% Mac OSX, but I still use Git on Windows for a few projects, and I get a lot of questions about Git on Windows. [...]]]></description>
			<content:encoded><![CDATA[<p>I adopted <a href="http://git-scm.com/">Git</a> as my primary source control tool a couple of years ago, when I was using Windows as my primary (90%) desktop OS. Since then I’ve switched to 75% Mac OSX, but I still use Git on Windows for a few projects, and I get a lot of questions about Git on Windows.</p>
<p>I use msysgit (and its included GUI) most often myself, but I don’t have a clear answer as to which is the “best” Git GUI for Windows. I can offer this list of choices, though, along with some thoughts about them.</p>
<p>There is also a <a href="https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools">very long list of Git tools on the main Git wiki</a>; but that page is just a list, without any other information.</p>
<h2>msysgit</h2>
<p><a href="http://code.google.com/p/msysgit/">msysgit</a> is the main project which ships a Windows port of Git. It is based on MSYS, so it fits in the Windows ecosystem a bit better than the cygwin Git port.</p>
<p><a href="http://kylecordes.com/2010/git-gui-client-windows/msysgit1" rel="attachment wp-att-721"><img class="alignnone size-full wp-image-721" title="msysgit" src="http://kylecordes.com/blog/wp-content/uploads/2010/08/msysgit1.png" alt="" width="512" height="286" /></a></p>
<p>msysgit includes the same Tk-based GUI tools as Git on Linux: a commit tool and a repo-browse tool, plus a bit of shell integration to active the GUI by right-clicking in Windows Explorer, plus a new thing call git-cheetah, which appears to be heading toward Tortoise-style integration. These tools are a bit ugly, but have good and useful functionality. I don’t mind the ugly (I get my fix of stylish software over on my Mac&#8230;), and I find the features ample for most work.</p>
<p>If you don’t know where to start, or if you want a Linux-like Git experience, start with msysgit and learn to use its tools.</p>
<p>msysgit is free open source software. It is under active development, and keeps up with the upstream Git versions reasonably well. There is even a portable (zero-install) version available.</p>
<p>My biggest gripe with msysgit (and its GUI) is that I had to figure out how to use it effectively myself. I could have really used a video walkthrough of how to be productive with it, back when I was starting out. That was a long time ago for me, but might be Right Now for people reading this post. Mike Rowe (a reader) helpfully suggested <a href="http://nathanj.github.com/gitguide/tour.html">this msysgit tour</a>, which is very helpful though a bit dated.</p>
<h2>TortoiseGit</h2>
<p>This is an attempt to port TortoiseSVN to git, yielding <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a>. If you like and use TortoiseSVN, you’ll probably find this worth a try. I haven’t tried it yet myself.</p>
<p><a href="http://kylecordes.com/2010/git-gui-client-windows/commit-tor" rel="attachment wp-att-722"><img class="alignnone size-full wp-image-722" title="TortoiseGit commit screen" src="http://kylecordes.com/blog/wp-content/uploads/2010/08/commit-tor.jpg" alt="" width="623" height="526" /></a></p>
<p>TortoiseGit is free open source software, and is under active development.</p>
<h2>Git Extensions</h2>
<p>This Git GUI has a shell extension (like the Tortoise family) and also a plugin for Visual Studio. From the screen shots, it appears to be feature-rich and complete.</p>
<p><a href="http://kylecordes.com/2010/git-gui-client-windows/commitlog-git-extensions" rel="attachment wp-att-725"><img class="alignnone size-full wp-image-725" title="CommitLog-Git-Extensions" src="http://kylecordes.com/blog/wp-content/uploads/2010/08/CommitLog-Git-Extensions.jpg" alt="" width="655" height="412" /></a></p>
<p><a href="http://code.google.com/p/gitextensions/">Git Extensions</a> is free open source software, and is under active development.</p>
<h2>SmartGit</h2>
<p>Unlike the other tools listed here, <a href="http://www.syntevo.com/smartgit/index.html">SmartGit</a> is a commercial product (from a German company), starting at around $70. It appears to be more polished than the others, as is often the case with commercial products. It also appears to be quite feature-rich.</p>
<p><a href="http://kylecordes.com/2010/git-gui-client-windows/smartgit-project-screen" rel="attachment wp-att-726"><img class="alignnone size-full wp-image-726" title="smartgit-project-screen" src="http://kylecordes.com/blog/wp-content/uploads/2010/08/smartgit-project-screen.png" alt="" width="716" height="498" /></a></p>
<p>I don’t know how SmartGit fits in with the Git licensing; Git is licensed GPL (v2), so I assume (hope?) SmartGit has found some way to use it under the hood without linking to it in a way that would cause license trouble.</p>
<p>SmartGit requires a Java runtime, implying that it is written in Java. Five year ago I thought of that as a caveat; but today, Java-based GUIs can be extremely attractive and fast, so I don’t see as a problem at all.</p>
<h2>Is IDE Integration Vital?</h2>
<p>I know people who swear by their IDE experience, and are aghast at the thought of any daily-use dev tool that is not integrated with their IDE. It is almost as though for this group, multitasking does not exist, and any need to run more than one piece of software at the same time is a defect.</p>
<p>Now I love a good IDE as much as anyone (I&#8217;ve urged and coached many developers to move from an editor to an IDE), but I don&#8217;t agree with the notion that source control <strong>must always</strong> be in the IDE. IDE-integrated source control can be very useful, but there are sometimes cases where non-integrated source control wins.</p>
<p>The most common example for me is when using Eclipse on a large, complex system. There are two annoyances I see regularly:</p>
<ul>
<li>Eclipse assumes that one Eclipse project is one source control project, an assumption that is sometimes helpful and sometimes painful. In the latter case, simply ditch the Eclipse integration, and use a whole workspace (N projects) as a single source-control project, outside of Eclipse.</li>
<li>Sometimes Eclipse source control integration bogs down performance. Turn it off, and things speed up.</li>
</ul>
<p>Therefore, when I use Eclipse, I sometimes manage the files from outside, using msysgit, command line, etc. When I have a complex &#8220;real-life project&#8221; comprised of many Eclipse &#8220;projects&#8221;, I set up a separate Eclipse workspace for it, apart from other unrelated Eclipse projects.</p>
<h2>Feedback Wanted</h2>
<p>I’d love to hear about:</p>
<ul>
<li>More Windows Git GUIs to list here</li>
<li>Anything else I’ve missed</li>
</ul>
<p>.. via the contact page (link at the top of the page). I try to reply to all email within a few days.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2010/git-gui-client-windows/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Missing your .svn\tmp directories? One line fix.</title>
		<link>http://kylecordes.com/2009/missing-svntmp-fix</link>
		<comments>http://kylecordes.com/2009/missing-svntmp-fix#comments</comments>
		<pubDate>Thu, 08 Oct 2009 14:20:37 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[source-control]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://kylecordes.com/?p=319</guid>
		<description><![CDATA[You may find with &#8220;svn cleanup&#8221; (or its TortoiseSVN equivalent) fails with an error message about &#8220;system cannot find the path specified&#8221;. If you research this error, you may find that the SVN dev team knows that svn-cleanup does not clean up this particular problem, and as of SVN version 1.6.5, considers that OK. There [...]]]></description>
			<content:encoded><![CDATA[<p>You may find with &#8220;svn cleanup&#8221; (or its TortoiseSVN equivalent) fails with an error message about &#8220;system cannot find the path specified&#8221;. If you research this error, you may find that the SVN dev team knows that svn-cleanup does not clean up this particular problem, and as of SVN version 1.6.5, considers that OK.</p>
<p>There is an easy fix, though. The tools are already present on nearly any Linux system, and are available in Cygwin or MSYS on Windows. Navigate to the top of your SVN working directory, and run this:</p>
<p><code>find . -iname '.svn' -exec mkdir {}/tmp \;</code></p>
<p>If all you were missing was some empty tmp directories, svn cleanup will now work, as will svn update and friends. Of course you may have other, additional problems with your .svn directories.</p>
<p>A mystery, for me and others, is how the missing .svn\tmp directory situation comes about. The best guess I&#8217;ve seen, but not yet reproduced here, is that a helpful piece of software (perhaps a backup tool?) deletes empty directories.</p>
<p>The great majority of all software I&#8217;ve used, does not depend on empty directories, and I likewise heartily recommend <strong>not </strong>designing software in such a way that it requires that empty directories are preserved. <strong>If you need a directory, please keep something in it.</strong> If you don&#8217;t need anythign in it, be willing to rereate it when you have something to put in it. Make it Just Work.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2009/missing-svntmp-fix/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>gitosis on Ubuntu 9.04 Jaunty</title>
		<link>http://kylecordes.com/2009/gitosis-ubuntu-jaunty</link>
		<comments>http://kylecordes.com/2009/gitosis-ubuntu-jaunty#comments</comments>
		<pubDate>Thu, 30 Apr 2009 18:28:29 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[source-control]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://kylecordes.com/?p=258</guid>
		<description><![CDATA[As of April 2009, the gitosis package in Ubuntu 9.04 Jaunty is broken; it fails with an error like so: pkg_resources.DistributionNotFound: gitosis==0.2 There are quite a few pages and mailing list messages that mention this. I only found one with a good hint toward a solution, which was that it is also a known issue [...]]]></description>
			<content:encoded><![CDATA[<p>As of April 2009, the gitosis package in Ubuntu 9.04 Jaunty is broken; it fails with an error like so:</p>
<p>pkg_resources.DistributionNotFound: gitosis==0.2</p>
<p>There are quite a few pages and mailing list messages that mention this. I only found one with a good hint toward a solution, which was that it is also a known issue on Debian. Following that lead, I got it working by grabbing newer packages from Debian Unstable:</p>
<pre>wget http://ftp.us.debian.org/debian/pool/main/p/python-support/python-support_1.0.2_all.deb
wget http://ftp.us.debian.org/debian/pool/main/g/gitosis/gitosis_0.2+20080825-14_all.deb
sudo dpkg -i python-support_1.0.2_all.deb
sudo dpkg -i gitosis_0.2+20080825-14_all.deb</pre>
<p>Use this at your own risk; your mileage may vary.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2009/gitosis-ubuntu-jaunty/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Webby &#8211; Client-side, static content management system</title>
		<link>http://kylecordes.com/2008/webby</link>
		<comments>http://kylecordes.com/2008/webby#comments</comments>
		<pubDate>Sun, 12 Oct 2008 19:12:53 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[source-control]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2008/10/12/webby/</guid>
		<description><![CDATA[This afternoon I rebuilt OasisDigital.com using Webby, stripping out hand-coded HTML and replacing it with much more maintainable Markdown. The site looks about the same as before (which is to say, mediocre), but under the hood it is much easier to update. We intend to use this new ease, to move forward in improving it. [...]]]></description>
			<content:encoded><![CDATA[<p>This afternoon I rebuilt <a href="http://oasisdigital.com">OasisDigital.com</a> using Webby, stripping out hand-coded HTML and replacing it with much more maintainable Markdown. The site looks about the same as before (which is to say, mediocre), but under the hood it is much easier to update. We intend to use this new ease, to move forward in improving it. There is a general principle here, which applies broading in software development also:</p>
<p><strong>If you need to make a change, but that change is difficult / tedious / risky to make, first improve the underlying system that makes it so.</strong><br />
(OasisDigital.com is a static web site; we have dynamic contact (issue trackers, etc.) to automate our work together and with our customer, but that content is on another domain.)</p>
<p><a href="http://webby.rubyforge.org/">Webby</a> is a client-side, simple <a href="http://www.google.com/search?q=static+cms">CMS for generating static web sites</a>, written in Ruby. Why serve a static site (plain old files on a web server) in 2008?</p>
<ul>
<li>It minimizes the moving parts, there is almost nothing to break or maintain.</li>
<li>It is very unlikely that any hosting issue will break a static site.</li>
<li>It is easy to serve a static site fast (though our current host, TextDrive, sometimes is not all that fast).</li>
<li>Security vulnerabilities are very unlikely, in the absence of any executable content.</li>
<li>The canonical content (in this case, mostly Markdown) is stored in plain text files, which we track, diff, and merge in git.</li>
</ul>
<p>In an earlier foray in to Drupal, we found that Drupal has extensive and useful capabilities, as well as a vibrant community, but it also has many moving parts; too many, in my judgment, to make it a good solution for building an essentially static web site.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2008/webby/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Talk at the STL JUG</title>
		<link>http://kylecordes.com/2008/jug-git-talk</link>
		<comments>http://kylecordes.com/2008/jug-git-talk#comments</comments>
		<pubDate>Fri, 10 Oct 2008 21:56:59 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Presentations]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[source-control]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2008/10/10/jug-git-talk/</guid>
		<description><![CDATA[Yesterday (Oct. 9, 2008), I gave a talk on Git at the St. Louis Java User Group. Rather than a typical &#8220;intro&#8221; talk, instead I showed a dozen or so common usage scenarios, then answered questions with additional ad-hoc demos. As with some other recent talks, I eschewed PowerPoint in favor of a printed handout. [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday (Oct. 9, 2008), I gave a talk on Git at the St. Louis Java User Group. Rather than a typical &#8220;intro&#8221; talk, instead I showed a dozen or so common usage scenarios, then answered questions with additional ad-hoc demos. As with some other recent talks, I eschewed PowerPoint in favor of a printed handout. The text of the handout follows below, or you can <a href="/files/Kyle-Cordes-Git-Tour-Talk.pdf">download the PDF</a>. I also recorded the <a href="/files/2008-10-10-git-JUG-talk.wma">audio of the talk</a>, but without video, so the general discussion portions are worthwhile but the demo portions are not.<br />
<span id="more-184"></span></p>
<h4>Introduction and Agenda</h4>
<p>Linus Torvalds wanted a replacement for BitKeeper. He wrote the first version of Git in a few weeks. A few years later, Git is now the leading contender among distributed source control tools: <a href="http://kylecordes.com/%3Ehttp://git.or.cz/">http://git.or.cz/</a></p>
<p>This will not be a typical “introduction” talk; there are ample introductions to Git on the WWW. Instead, I’ll wander through some source control use cases, pointing out Git features, strengths, and weaknesses along the way.</p>
<p>I use Git on both Linux and Windows, and I use both the command line and GUI tools. For this presentation, I will show how it works on Windows, and mostly use the included GUI tools.</p>
<p>We’ll end a bit early, to leave time for questions and ah doc demos.</p>
<h4>Why Git?</h4>
<p>Git promises to keep your files exactly as they are, and uses hashes to make it happen.</p>
<p>Git is very fast; speed matters a lot more than you might think.</p>
<p>Git is distributed and local, it works very well offline as well as online.</p>
<p>Git handles the realities of branching and merging.</p>
<p>Git has an enormous set of very useful features.</p>
<p>Git is clearly a tool made by people who love great tools.</p>
<h4>Get Git</h4>
<p>Deb/Ubuntu:   apt-get install git-core</p>
<p>Windows:        http://code.google.com/p/msysgit/</p>
<h4>Version Some Files, Look at Them</h4>
<p>git init                      git add                    git-gui</p>
<p>git commit                .gitignore                                gitk</p>
<h4>Use Git with Eclipse</h4>
<p>There is a git-Eclipse project in development:</p>
<p>http://repo.or.cz/w/egit.git</p>
<p>However, I will show how to use Git and Eclipse without any integration. This turns out to be much less problematic than you might initially guess, and has advantages:</p>
<p>If you use git with multiple IDEs, you only need to learn one interface.</p>
<p>You can use the tool in ways that the IDE does not anticipate, such as by versioning a whole workspace as a unit.</p>
<h4>Branch and Merge</h4>
<p>git branch                                git checkout -b newbranch</p>
<p>git diff                                     git merge</p>
<h4>Rebase</h4>
<p>The <strong>best</strong> thing in the world, a <strong>great</strong> capability.</p>
<p>The <strong>world</strong> thing in the world, <strong>never</strong> do this.</p>
<p>My advice: Have it in your toolbox, but be careful.</p>
<h4>Review and Search History</h4>
<p>The sample repos from tonight’s demo don’t have much history to show; but with git, and without relying on a network connection, we can see git’s review and search capabilities on projects “in the wild”.</p>
<h4>Rearranging Files</h4>
<p>Git tracks content, and will follow that content as it moves around, without you telling it about the moves. This is extremely helpful if you have a pile of files to rearrange.</p>
<p>http://kylecordes.com/2008/07/18/rearrange-file-svn-git/</p>
<h4>Blame!</h4>
<p>Poll: <strong>Do you use Blame</strong>? How often? Does it help?</p>
<p>Blaming is a terrible way to interact with other people… but get over the name, because “blame” is a <strong>fantastic</strong> source control feature.</p>
<h4>Host Your Repo on Your Server</h4>
<p>Git has a built in ability to host repos, and also includes gitweb.</p>
<p>Gitosis is also a great tool: http://eagain.net/gitweb/?p=gitosis.git</p>
<h4>GitHub</h4>
<p>Don’t want to mess with hosting?  http://github.com/</p>
<h4>Enterpriseynessility</h4>
<p>Git does not have all the same feature as whatever enterprisey tool you may be using. It has a different set of features. YMMV, but in my opinion it is a “disruptive innovation”.</p>
<h4>Git-SVN</h4>
<p>Git makes a great front end for SVN; I use it this way regularly on Linux. Msysgit does not currently include git-svn, so no demo.</p>
<h4>Tips</h4>
<p>Initial Setup:</p>
<p>git config &#8211;global color.diff auto</p>
<p>git config &#8211;global color.status auto</p>
<p>git config &#8211;global color.branch auto</p>
<p>export PS1=&#8221;\u@\h \W\$(git-branch 2&gt; /dev/null | grep -e &#8216;\* &#8216; | sed &#8216;s/^..\(.*\)/ {\1}/&#8217;)\$ &#8221;</p>
<p>Remove from source control, the files you have removed from the file system:</p>
<p>git ls-files -z &#8211;deleted | git update-index -z &#8211;remove &#8211;stdin</p>
<h4>Using Git in a Closed Team</h4>
<p>There are many ways to use Git; you can think of it as mostly a superset of what other systems do. You can use Git to achieve many possible workflows. Here is one way to use it effectively:</p>
<p>Set up a server everyone can pull from and push to.</p>
<p>Use Gitosis or similar.</p>
<p>Have one(+) repo per developer, and one(+) for leads to all push to.</p>
<p>Everyone pushes to their repo.</p>
<p>Leads pull from others’ repos, and push to the main repo.</p>
<p>Server performance is not important, a slow machine can serve many users.</p>
<p>Backup is not all that important, you will not actually lose anything if the machine dies.</p>
<p>Make your initial repo fork for each person, on the server, for speed and space sharing.</p>
<h4>Using Git for Open Source</h4>
<p>Clone the project’s repo.</p>
<p>Hack.</p>
<p>Push your changes to your public repo (perhaps on Github)</p>
<p>Get someone to pull them.</p>
<p>git format-patch, if you want to send them.</p>
<h4>Problems in the Git World</h4>
<p>On Linux, things are going very well. But on Windows, not so well: the Windows port itself  is advancing nicely, but it appears to suffer somewhat badly from the “I am just doing this for fun, if you want it fix, make a patch” problem.</p>
<p>My opinion: to really thrive on Windows, Git needs a firm to create a commercial offering around it, and feed lots of core fixes back to the project.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2008/jug-git-talk/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rearranging files in SVN? Use git-svn instead.</title>
		<link>http://kylecordes.com/2008/rearrange-file-svn-git</link>
		<comments>http://kylecordes.com/2008/rearrange-file-svn-git#comments</comments>
		<pubDate>Fri, 18 Jul 2008 21:04:55 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[source-control]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2008/07/18/rearrange-file-svn-git/</guid>
		<description><![CDATA[From time to time I need to rearrange a set of files in a project, typically while revamping the file / directory layout of a set of source files. The most direct way to do so is by dragging the files around (using a Windows or Linux GUI), but this is quite tedious to do [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time I need to rearrange a set of files in a project, typically while revamping the file / directory layout of a set of source files. The most direct way to do so is by dragging the files around (using a Windows or Linux GUI), but this is quite tedious to do if the files are in a Subversion repo, because SVN does not understand the file moves and renames unless you use &#8220;svn mv&#8221; or (with TortoiseSVN) right-click-drag the files to new locations.</p>
<p>The answer to all this is simple: use git-svn for your SVN checkout, instead of the SVN command lines tools or Tortoise. You can readily Google for extensive git-svn information to get started.</p>
<p>The workflow with git-svn for file rearrangement is fairly simple, and very fast:</p>
<ul>
<li>&#8220;git svn rebase&#8221; to get your local git repo up to date with your SVN repo.</li>
<li>make new directories, rearrange files, rename files, etc., using any tool you like. This is easy and painless because git (wisely) keeps all the metadata in a top-level .git directory. It is fast because you aren&#8217;t running any svn code (or any git code) while doing so.</li>
<li>use &#8220;git add&#8221;, or the git GUI, to add the newly moved / renamed files.</li>
<li>&#8220;git commit&#8221;</li>
<li>&#8220;git svn dcommit&#8221; to push the changes over to SVN.</li>
</ul>
<p>git / git-svn looks at the content of files, notices (rather than you needing to tell it) that the content has been moved to different filenames in different directories, and generates SVN move/copy operations. It even notices nearly-identical (edited) files and handles them correctly.</p>
<p>One loose end is left hanging, which is that git-svn does not remove any now-empty or removed directories from SVN, a consequence of git not caring about directories. Therefore, if you need the empty directories removed from the SVN repo, use a normal SVN client (command line, Tortoise) to do so.</p>
<p>From the description of above, this does not initially sound like a big win; but with hundred of files to move around, the time for the git commands (instant, except for the first and last) is irrelevant, and the time/hassle saved is enormous.</p>
<p>Perhaps someday SVN itself will gain the ability to &#8220;just work&#8221; when you move or rename files / directories, rather than having to be told.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2008/rearrange-file-svn-git/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting Started with Git and GitHub on Windows</title>
		<link>http://kylecordes.com/2008/git-windows-go</link>
		<comments>http://kylecordes.com/2008/git-windows-go#comments</comments>
		<pubDate>Wed, 30 Apr 2008 16:51:17 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[source-control]]></category>
		<category><![CDATA[top]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2008/04/30/git-windows-go/</guid>
		<description><![CDATA[(Update: I have a new, related post about the Best Git GUIs for Windows.) I’ve been attracted to, and trying out, various distributed source control tools for the last two years, and have come to the conclusion that the most likely “winner” is Git. Git does a great many things right, good progress is being made [...]]]></description>
			<content:encoded><![CDATA[<p>(<strong>Update</strong>: I have a <strong>new, related post </strong>about the <a href="http://kylecordes.com/2010/git-gui-client-windows">Best Git GUIs for Windows</a>.)</p>
<p>I’ve been attracted to, and trying out, various distributed source control tools for the last two years, and have come to the conclusion that the most likely “winner” is Git. Git does a great many things right, good progress is being made in the few areas it is weak, and it has rapidly growing popularity. There are many web sites with extensive information about using Git, learning Git, Git integration, and more.</p>
<p>For new Oasis Digital projects, we will generally Git rather than SVN for source control. Here are instructions I wrote to help our teams get started. The contents here are 95% generic, but <strong>the references to me are, of course, Oasis-Digital-specific</strong>.</p>
<p>(For a general introduction to Git, consider <a href="http://learn.github.com/p/intro.html">this video at GitHub</a>.)</p>
<h2>GitHub</h2>
<p>Although Git is a fully distributed source control system, it is very convenient to have a set of robust, central repositories. Oasis Digital’s repositories are hosted by GitHub:</p>
<p><a href="http://github.com/">http://github.com/</a></p>
<p>Github offers a useful set of online features to supplement what Git has built in and available locally. As of the spring of 2008, GitHub is certainly a work-in-progress, I’d characterize is as a “beta” level service. Nonetheless it is worthwhile and recommended. There is a lot to learn from the “guides” published here also:</p>
<p><a href="http://github.com/guides">http://github.com/guides</a></p>
<h2>Install and Configure msysGit on Windows</h2>
<p>I assume here that you are using Windows, although Git works very well (better, actually) on Linux or Mac. As I write this, the best Windows Git package is msysgit, available here:</p>
<p><a href="http://code.google.com/p/msysgit/">http://code.google.com/p/msysgit/</a></p>
<p>Make sure to follow the download instructions labeled “If you only want to use Git”. As I write this the download is Git-1.5.5-preview20080413.exe, but <strong>get the current version available as you read this instead</strong>, not that specific version.</p>
<p>Install by running the EXE installer. Accept the default install directory. When you get to the PATH setting screen, I recommend the “Use Git Bash only” setting, because it avoid any risk of PATH conflicts.</p>
<p>By default, Git will be configured to translate text files between Windows CRLFs (in your working copy) and Unix LFs (in repositories). This setting is fine if you like to use an editor on Windows that insists on Windows CRLFs. I generally use an editor that is equally happy to use Unix LFs, so I sometimes use Git in the other (non-translating) mode.</p>
<p>msysgit includes both the git command line, and a usable GUI. The GUI is not on par with more mature products, but it is helpful and good enough for users who are allergic to the command line.</p>
<h2>Create your SSH Key</h2>
<p>The first step in using Git is to create your SSH Key. This will be used to secure communications between your machine and other machines, and to identify your source code changes. (If you already have an SSH key for other reasons, you can use it here, there is nothing Git-specific about this.)</p>
<p>In Windows Explorer, pick any convenient directory, right-click, and choose “Git Bash Here”.</p>
<p><img src="http://kylecordes.com/images/git-screens/Capture-04-30-00002.png" alt="" /></p>
<p><img src="http://kylecordes.com/images/git-screens/Capture-04-30-00003.png" alt="" /></p>
<p>Then type this command:</p>
<pre>ssh-keygen -C "username@email.com" -t rsa</pre>
<p>(with your own email address, of course)</p>
<p>Accept the default key file location. When prompted for a passphrase, make one up and enter it. If you feel confident that your own machine is secure, you can use a blank passphrase, for more convenience and less security. Note where it told you it stored the file. On the machine I tested with, it was stored in “C:\Documents and Settings\Kyle\.ssh\”</p>
<p>Open the file id_rsa.pub with a text editor. The text in there is your “public SSH key”. You will need it to set up your GitHub account, in the next section.</p>
<p>Beware of $HOME trouble: a reader reported a tricky failure mode in which some other software he installed had set up a HOME or HOME_PATH environment variable pointing in to that application instead of to your real home (&#8220;Documents and Settings&#8221;) directory.</p>
<p>More details on the key process are available here:</p>
<p><a href="http://github.com/guides/providing-your-ssh-key">http://github.com/guides/providing-your-ssh-key</a></p>
<h2>Set up your GitHub account</h2>
<p>Go to <a href="http://github.com/">http://github.com/</a> and sign up for a free account. In the sample here I signed up with a made-up alter-ego, harry@kylecordes.com. Use your own, real email address of course.<br />
<img src="http://kylecordes.com/images/git-screens/Capture-04-30-00004.png" alt="" /></p>
<p>Don’t worry that GitHub describes the free account as for “open source” work; I will later add you as a collaborator to my paid (and therefore private, non-open-source) projects. Make sure to copy-paste in your SSH public key that you created earlier.</p>
<p>Once you have set up your github account, email your <strong>github username</strong> (not your password) to me, so I can add you to the relevant project(s). <em>(Reminder &#8211; send to me <strong>only</strong></em><em> if you are working on an Oasis Digital project! If you are using this page as generic Git instructions, send the information to <strong>your project leader</strong></em><em> instead!</em>)</p>
<p>Once I have added you as a collaborator to the relevant project and sent back its URL, you can navigate to the URL, which will look like this:</p>
<p>https://github.com/kylecordes/PROJECTNAME/tree/master</p>
<p>On that page, click the “fork” button to create your own workspace for the project. This will take you to your own page for the project, something like this:</p>
<p>https://github.com/YOURNAME/PROJECTNAME/tree/master</p>
<p><img src="http://kylecordes.com/images/git-screens/Capture-04-30-00005.png" alt="" /></p>
<p>Now you can clone this project to your own machine, as discussed below.</p>
<h2>Getting Started Locally</h2>
<p>First, use the &#8220;Git Bash Here&#8221; feature described above, to get a command prompt. Tell Git about your name and email address:</p>
<p><code><br />
git config --global user.email Your.Email@domain.com<br />
git config --global user.name "Your Real Name"<br />
</code></p>
<p>Then you are ready to proceed with getting into a project. Copy the “Clone URL” from a github project page. Make a new directory on your machine, to become your working directory. There are two approaches to which project to clone.</p>
<ol>
<li>Clone from your own fork repo. This will make it trivial to push your changes up, but require one more command to get upstream changes.</li>
<li>Clone from the upstream (my) repo. This will make it trivial to get change, but require one more command to be able to push changes, because you can&#8217;t push to another Github users&#8217; repo.</li>
</ol>
<p>I assume later in these instructions that you chose <strong>#1</strong>.</p>
<p>Next, get your local clone by clicking, or by typing.</p>
<h3>Approach 1: GUI</h3>
<p>In Windows Explorer, Right click the working directory and choose “Git GUI Here”.</p>
<p>Choose “Clone Existing Repository” in the dialog that comes up:</p>
<p><img src="http://kylecordes.com/images/git-screens/Capture-04-30-00007.png" alt="" /></p>
<p>Paste the URL that you copied above from GitHub. Note that in the screenshot I show it as if you clone your repo, while I think it&#8217;s slightly easier overall to clone the upstream repo. Thus it really should show <strong>git@githib.com:kylecordes/sample1.git</strong> instead.<br />
Note that your browser might add an erroneous <a href="mailto:">mailto:</a> to the URL, which you must remove – Git URLs do not start with “mailto”.  Enter the directory where you want your working copy:</p>
<p><img src="http://kylecordes.com/images/git-screens/Capture-04-30-00009.png" alt="" /></p>
<p>Make sure to use real, reasonable values. For example, you are not working “sample1” and you probably don’t keep your working projects in a directory named “GitStuff”, so put in a directory that makes sense for the project you are working on. Also, put your working copy in a place where you can effectively work in it; for example the working copy for a web project should usually be under the webroot of your local development web server.</p>
<p>Click Clone. You will be prompted for your passphrase if you used one. In a few minutes the Clone will finish, and you have the project available on your machine. I&#8217;ve had sporadic problems with this process hanging (growing pains at GitHub are the likely cause), so if you don&#8217;t see progress for a few minutes, stop it and start over.</p>
<h2>Approach 2: Command Line</h2>
<p>I find this easier. In Windows Explorer, right-click on the working directory you want and choose “Gui Bash Here”. Then enter a command like this:</p>
<p><strong>git clone repoURL</strong></p>
<p>Git might prompt you about an SSH key, the first time you do this with github (or any other new server). Answer “yes”.</p>
<p>It’s worth pointing out here, if you didn’t already understand from the various Git web sites, that Git is a distributed source control system. It will pull down the whole project history, so you can browse history and even commit changes without online access. Thus Git works very well if you have an intermittent or poor network connection.</p>
<h2>Work Flow</h2>
<p>As with all source control, work in the directory where you use source control. Do <strong>not</strong> copy files back and forth between here and some other working directory, that is a path to endless merge and update problems.</p>
<p>Once you have checked out the software, here is a summary of your work flow. For more details, please read the copies Git documentation online. I suggest reading both the official Git material, as well as other sites and articles about Git.</p>
<p><strong>Getting Changes</strong></p>
<p>Get changes from others with “git pull” (or using the GUI).  By default this will pull from the repo from which you cloned, so if you cloned the upstream repo, that will get other peoples&#8217; changes.</p>
<p>If you cloned from your own Github repo, you&#8217;ll need to use something like this:</p>
<p><code><br />
git remote add upstream git@github.com:kylecordes/sample1.git<br />
git pull kyle upstream<br />
</code></p>
<p><strong>Sending Changes</strong></p>
<p>Commit your changes locally with “git commit” (or using the GUI). Remember that Git generally wants you to explicitly say which files&#8217; changes to include (&#8220;git add&#8221;), so make sure you read and understand enough about Git to do this properly; it is only a few commands or clicks in the GUI. The usual caveat applies, to only commit actual source files, not generated files or temp files.</p>
<p>Push your changes up to your GitHub repository with “git push”. <strong>This step will make it so others on your project can see your changes</strong>. Do this at least once per day, and ideally more often as you collaborate. Assuming that you cloned from the upstream repo, you&#8217;ll need to set up a reference to your own Github repo (the one you can push to), with something like this:</p>
<p><code><br />
git remote add harry git@github.com:harrycordes/odtimetracker.git<br />
</code></p>
<p>As usual, use reasonable names and relevant URLs, not my sample names and URLs. Once you&#8217;ve added the remote reference, pushing is easy:</p>
<p><code><br />
git push harry master<br />
</code></p>
<p>When you have a set of changes (one or more commits) that you think are ready to go in to the main-line of the project, use Github to issue a “pull request”. Your project lead (me, typically, at Oasis Digital) will review your commits and either pull them in to the main-line, or send feedback about changes needed before they can be pulled in.</p>
<p>A key thing to understand about Git is that it makes branching extremely easy and fast, so that very convenient to use branches. If you are accustomed to other source control systems where branching is a big, painful thing, it will be very different for you in Git. Once you learn to use branches, you&#8217;ll sometimes push up a branch you are working on instead of master.</p>
<p>I&#8217;ve only scratched the surface in this introduction. You now have Git up and running with project code in it, so pick up a Git tutorial or reference (such as the screencast videos at <a href="http://www.gitcasts.com/">GitCasts</a>) and start learning.</p>
<p><strong>To Learn More</strong></p>
<p>I heartily recommend the &#8220;<a href="http://nathanj.github.com/gitguide/index.html">Illustrated Guide to Git on Windows</a>&#8220;. It doesn&#8217;t yet cover GitHub, but does cover many more details of using Git itself.</p>
<p>Also, a bit of Git can be very useful even in a project that uses SVN, especially when you need to <a href="http://kylecordes.com/2008/rearrange-file-svn-git">rearrange a bunch of files in SVN</a>.</p>
<p><strong>Update: In a newer post,</strong> I list several other <a href="http://kylecordes.com/2010/git-gui-client-windows">Git GUIs for Windows</a>.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2008/git-windows-go/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Git on Windows, it actually works now</title>
		<link>http://kylecordes.com/2008/git-windows-works</link>
		<comments>http://kylecordes.com/2008/git-windows-works#comments</comments>
		<pubDate>Sat, 22 Mar 2008 16:10:15 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[source-control]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2008/03/22/git-windows-works/</guid>
		<description><![CDATA[I’ve been trying out various distributed source control tools, and used several of them for various very small projects. I’ve most mostly settled on git as the one I prefer, but I haven’t yet published any code with it. Also, I’ve been frustrated that git support for Windows has been very weak. Msysgit appears to [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been trying out various distributed source control tools, and used several of them for various very small projects. I’ve most mostly settled on git as the one I prefer, but I haven’t yet published any code with it. Also, I’ve been frustrated that git support for Windows has been very weak.</p>
<p><a href="http://code.google.com/p/msysgit/">Msysgit</a> appears to have solved the git-windows problem, at least well enough for small scale work. If you’ve been holding back on trying git because you use Windows, now is the time to jump in.</p>
<p><strong>Update:</strong> I&#8217;ve posted <a href="http://kylecordes.com/2008/04/30/git-windows-go/">details on how to get started with msysgit and GitHub</a> as well as a <a href="http://kylecordes.com/2010/git-gui-client-windows">comparison of Git software for Windows</a>.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2008/git-windows-works/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Distributed Version Control for the Other 80%</title>
		<link>http://kylecordes.com/2007/dvcs-80-percent</link>
		<comments>http://kylecordes.com/2007/dvcs-80-percent#comments</comments>
		<pubDate>Wed, 17 Oct 2007 02:24:56 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[commentary]]></category>
		<category><![CDATA[source-control]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2007/10/16/dvcs-80-percent/</guid>
		<description><![CDATA[Ben Collins-Sussman, one of the key developers behind Subversion, argues in Version Control and the 80% that distributed version control will remain a niche interest, and will not move in to the mainstream (as his favorite tool certainly has). He has a number of good reasons to back up this thesis. I think he’s wrong. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.red-bean.com/sussman/">Ben Collins-Sussman</a>, one of the key developers behind <a href="http://subversion.tigris.org/">Subversion</a>, argues in <a href="http://blog.red-bean.com/sussman/?p=79">Version Control and the 80%</a> that distributed version control will remain a niche interest, and will not move in to the mainstream (as his favorite tool certainly has). He has a number of good reasons to back up this thesis.</p>
<p>I think he’s wrong. The “other 80%” are not profoundly stupid imbeciles who could never grasp the point of DVCS. Rather they are, generally, working developers with important projects underway, for which they need tools to work well out of the box when used in the default way. DVCS tools can certainly do that. More specifically, the list of reasons he gives why DVCS won’t become broadly popular, should be read more as a to-do list of how to improve DVCS so they can become broadly popular. What the DVCS community needs is at least one DVCS which:</p>
<ul>
<li>Installs easily on Windows, with a single installer, including diff/merge tool and GUI</li>
<li>Includes a very good standalone GUI</li>
<li>Secures client/server (peer-to-peer) communicate by default, without user setup of SSH, HTTPS, etc.</li>
<li>Integrates well with Eclipse</li>
<li>Integrates well with Visual Studio</li>
<li>Integrates well with Explorer (i.e. TortoiseBlah)</li>
<li>Integrates, begrudgingly, with Microsoft’s SCC API so as to support the many tools which can use an SCC API plugin</li>
<li>Includes permission controls for server repositories, including good tools for configuration thereof</li>
<li>Automates sharing of branches trivially (some already do this, some less so)Automates the common ways of using a DVCS, most importantly the usage model in which the DVCS is used as a better SVN with full offline capabilities</li>
<li>Guides users, if so configured, gently back toward a small number (one, in some cases) of main central branches, which is what most projects want</li>
<li>Communicates clearly what kind of project it can support well (most of them) and what kind it won’t support well (those with an enormous pile of huge files, of which most users only need a few)</li>
</ul>
<p>(SVN itself is not without flaws. Ben lists some of them as areas in which improvements are coming, while others (such as, in my opinion, using the file namespace for branches and tags) are likely here to stay.)</p>
<p>In the next few years we will probably see one or more DVCS tools gain most or all of the features above. With addresses, an important truth will be more obvious: distributed source control is, in most ways, a superset of centralized source control, and the latter can be thought of as a special case of the former.</p>
<p>That said, though, I think the DVCS movement will lose a bit of steam when SVN ships better merge support, if that merge support is sufficiently good. The merge “features” are certainly the biggest issue we have here with SVN.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2007/dvcs-80-percent/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A Brief Introduction to Distributed Version Control</title>
		<link>http://kylecordes.com/2007/intro-dvcs</link>
		<comments>http://kylecordes.com/2007/intro-dvcs#comments</comments>
		<pubDate>Fri, 12 Oct 2007 00:16:14 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Presentations]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[source-control]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2007/10/11/intro-dvcs/</guid>
		<description><![CDATA[Last night at SLUUG, I have a talk on distributed source control tools. It was quite introductory, but the notes (below) may still be helpful. These notes were on a handout at the talk, as usual I didn&#8217;t use slides. Unfortunately I didn&#8217;t get an audio recording of this talk, so no transcript either. About [...]]]></description>
			<content:encoded><![CDATA[<p>Last night at <a href="http://www.sluug.org/">SLUUG</a>, I have a talk on distributed source control tools. It was quite introductory, but the notes (below) may still be helpful. These notes were on a handout at the talk, as usual I didn&#8217;t use slides.</p>
<p>Unfortunately I didn&#8217;t get an audio recording of this talk, so no transcript either.</p>
<p>About 30 people were in attendance. Nearly 100% were familiar with CVS and SVN, and perhaps 20% with other tools (ClearCase, SourceSafe, and others). <strong>Only 4 had ever used branch/merge in any project or tool</strong>!</p>
<p><strong>A Brief Introduction to Distributed Version Control</strong></p>
<h2>You Branch and Merge.</h2>
<p>A fundamental truth: every time you edit a file you are branching, and every time you reconcile with another developer you are merging. In most tools you get one easy branch and merge locus: your local working directory. All other branching is a Big Deal.</p>
<p>It does not have to be this way.</p>
<h2>A Short Tour of 3 tools</h2>
<p>bzr: <a href="http://bazaar-vcs.org/">http://bazaar-vcs.org/</a></p>
<p>hg: <a href="http://www.selenic.com/mercurial/">http://www.selenic.com/mercurial/</a></p>
<p>git: <a href="http://git.or.cz/">http://git.or.cz/</a></p>
<p>Also, check your distro&#8217;s package system.</p>
<p>(At this point in the talk I demonstrated the basic features of each)</p>
<h2>What is a DVCS? Why Use a DVCS?</h2>
<p>Peer-to-peer design</p>
<p>Everyone gets all the features, rather than the interesting features limited to a high priest class.</p>
<p>Make use of the massive CPU and disk capacity on dev machines.</p>
<p>No central server needed, though many projects nominate a machine for this purpose.</p>
<p>Use a &#8220;dumb&#8221; storage location for a repository, if desired. Or a &#8220;smart server&#8221; for performance and security.</p>
<p>Work offline, with full history, branches, merges.</p>
<p>No central administrator is needed, potentially a cost savings.</p>
<p>Very cheap branching, in some cases immediate, even for large projects.</p>
<p>Very good merging, because you merge all the time.</p>
<p>Commit-then-merge, not merge-then-commit.</p>
<p>Repeated merge without havoc.</p>
<p>Merge keeps both sides of history, which is important because you merge a lot. This varies by tools, for example apparently bzr keeps this history less effectively than some others.</p>
<p>Depending on what you are coming from and which tool you choose, the speed gain can be so remarkable that it help every developer every day.</p>
<h2>Some SVN Nitpicks</h2>
<p>It is easy and tempting to pick on SVN. Linus does so vigorously in his online talk. I don&#8217;t hate it as much as he does but, these things bother me:</p>
<p>SVN is slow for large projects.</p>
<p>Branching in SVN sounds clever as you read its cheap copy story. It&#8217;s a great story. But actually using it is ridiculous; both in the URL-crazy syntax and utter lack of merge history.</p>
<p>We don&#8217;t need a better CVS, we need something much better than CVS.</p>
<p>.svn directories scattered all over are a pointless pain.</p>
<p>.svn directories are enormous, sometimes larger than the entire project history in git or hg!</p>
<h2>Security</h2>
<p>Security is a weak area in terms of out-of-the-box features and tutorials, because these tools come from the open source world where the default is for everyone to be able to see all code. However, with a little effort you can set up whatever security you like:</p>
<p>If you&#8217;re serving over HTTP, you can use Apache mod_whatever to control access.</p>
<p>Tunnel over SSH (in the box, in most cases) to avoid ever sending code in the clear.</p>
<p>Even a &#8220;dumb&#8221; storage location can be secured with SFTP.</p>
<p>Scripts can be used for per-branch and other fine grained access control, akin to what you can do with svn-access.conf. There are examples online.</p>
<h2>I Can&#8217;t Use a DVCS Because:</h2>
<p><em>SOX/HIPPA/CMM/etc. requires a centralized tool.</em></p>
<p>SOX/HIPPA/CMM/etc, is the standard reason why anyone can&#8217;t do anything. Some of these tools facilitate much stronger guarantees about the provenance of the source code than you get from a centralized tool, because they have credible and straightforward ways to verify that centralized store has not been compromized.</p>
<p><em>We are all in one place, therefore a DVCS makes no sense.</em></p>
<p>Actually many of the features in these tools are as useful in the same building as in a worldwide team.</p>
<p><em>Tool ZZZ is our corporate standard.</em></p>
<p>Then you should use it, don&#8217;t get fired. However, many people are using a DVCS in front of their corporate standard tool.</p>
<h2>DVCS vs DVCS:</h2>
<p>Many DVCS tools treat each repo/workspace as a branch and vice versa, so if you use many branches you will have many workspaces.</p>
<p>bzr can use shared files to reduce the bloat from this.</p>
<p>git handles many branches much better, with arbitrarily many per repo/workspace.</p>
<p>My feeling is that hg and git are more mature than bzr.</p>
<p>git does not work well on windows yet.</p>
<h2>Other DVCS to Consider</h2>
<p><strong>Monotone</strong> – has some slick features, but does not appear to scale well to large projects. It stores information in a SQLite DB. Monotone, unlike any others I&#8217;ve seen, replicates all branches by default, which is nice.</p>
<p style="margin-left: 9pt">An aside &#8212; there are fascinating thoughts on how to a data synchronization system can work, in the Monotone docs / presentations.</p>
<p><strong>arch</strong> / tla &#8212; one of the early DVCSs that started all this. I have heard it is mystifying to use.</p>
<p><strong>darcs</strong> &#8212; everyone loves its &#8220;cherry picking&#8221;, but I have not triedit.</p>
<p><strong>SVK</strong> &#8212; optimized for being a better svn client, with offline history and merging that works. Stores merge history in SVN attribute.</p>
<h2>More git Merging</h2>
<p>Depending on time, I will show more of the branch / merge facilities in git, as well as its gitk GUI.</p>
<h2>Other Resources</h2>
<p>http://wiki.sourcemage.org/Git_Guide</p>
<p>http://www.adeal.eu/</p>
<p><strong>Update:</strong> the following appeared a few days after my talk, it is very good, aside from slightly bogus listings in the &#8220;disadvantages&#8221; section:<br />
<a href="http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/">http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/</a></p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2007/intro-dvcs/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Upcoming talk: Intro to Distributed Source Control</title>
		<link>http://kylecordes.com/2007/distributed-talk</link>
		<comments>http://kylecordes.com/2007/distributed-talk#comments</comments>
		<pubDate>Mon, 01 Oct 2007 16:01:26 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[source-control]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2007/10/01/distributed-talk/</guid>
		<description><![CDATA[Where: SLUUG (though my talk is not listed on the site yet) When: October 10th, meeting starts at 6:30 PM I&#8217;ll introduce distributed source control tools: A short tour of the basic use of git, bzr, and hg (Mercurial) Thoughts on why you&#8217;d want to use a distributed source control tool at all, vs. a [...]]]></description>
			<content:encoded><![CDATA[<p>Where: <a href="http://www.sluug.org/">SLUUG</a> (though my talk is not listed on the site yet)</p>
<p>When: October 10th, meeting starts at 6:30 PM</p>
<p>I&#8217;ll introduce distributed source control tools:</p>
<ul>
<li>A short tour of the basic use of <a href="http://git.or.cz/">git</a>, <a href="http://bazaar-vcs.org/">bzr</a>, and <a href="http://www.selenic.com/mercurial/wiki/">hg</a> (Mercurial)</li>
<li>Thoughts on why you&#8217;d want to use a distributed source control tool at all, vs. a centralized system like SVN or CVS.</li>
<li>Some differences between these tools (and a few others), with thoughts on how to choose</li>
</ul>
<p>In response to a question below about slides&#8230; most likely there will be no slides. Rather there will be a handout (which will be posted on my site).</p>
<p><strong>Update</strong>: The handout notes are <a href="http://kylecordes.com/2007/10/11/intro-dvcs/">here</a>. Sorry, no audio/video/transcript this time.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2007/distributed-talk/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>svnmerge, a tool to manage SVN merges</title>
		<link>http://kylecordes.com/2007/svnmerge</link>
		<comments>http://kylecordes.com/2007/svnmerge#comments</comments>
		<pubDate>Wed, 27 Jun 2007 21:13:19 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[source-control]]></category>
		<category><![CDATA[xpstl]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2007/06/27/svnmerge/</guid>
		<description><![CDATA[We use SVN on a project with a lot of small branches, i.e. a branch for almost every non-trivial feature. This is not a particularly pleasant want to use SVN, but it meets another important need for our project: code review on the way in to the trunk (as a &#8220;gate&#8221;), rather than code review [...]]]></description>
			<content:encoded><![CDATA[<p>We use SVN on a project with a lot of small branches, i.e. a branch for almost every non-trivial feature. This is not a particularly pleasant want to use SVN, but it meets another important need for our project: code review on the way in to the trunk (as a &#8220;gate&#8221;), rather than code review for code already in trunk (&#8220;drive-by&#8221; code review).</p>
<p>Today on the XPSTL mailing list, <a href="http://tech.groups.yahoo.com/group/xpstl/message/2015">Mike Jorgensen pointed</a> me to <a href="http://www.orcaware.com/svn/wiki/Svnmerge.py">svnmerge</a>:</p>
<p>“svnmerge.py is a tool for automatic branch management. It allows branch maintainers to merge changes from and to their branch very easily, and automatically records which changes were already merged. This allows displaying an always updated list of changes yet to be merged, and totally prevents merge mistakes (such as merging the same change twice).”</p>
<p>svnmerge looks rough, but should still be a big improvement of SVN alone. It’s a ways short of what’s in the box with git, bzr, etc., but is also a much smaller step for a team using SVN.</p>
<p>Speaking of merging, Mark Shuttlework recently <a href="http://www.markshuttleworth.com/archives/126">argued merging is the key to software developer collaboration</a>. To me, this is obviously true, and not only for open-source projects, but for closed-source projects also.  If it sounds untrue to you, then you and I are probably thinking of different meanings of “merge”.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2007/svnmerge/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>synsync: another way to remotely backup / svnadmin dump an SVN repository</title>
		<link>http://kylecordes.com/2007/svnsync-svn-backup</link>
		<comments>http://kylecordes.com/2007/svnsync-svn-backup#comments</comments>
		<pubDate>Fri, 08 Jun 2007 17:56:52 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[source-control]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2007/06/08/svnsync-svn-backup/</guid>
		<description><![CDATA[Last month, I described an approach using SVK to remotely clone and then “svnadmin dump” an SVN repository. It turns out that there is an easier way “in the box” in SVN 1.4: the svnsync tool. Bob Ippolito describes how to do it, here are the minimal steps: $ MYREPO=/home/me/someplace    (do not use ~username, use [...]]]></description>
			<content:encoded><![CDATA[<p>Last month, I described <a href="http://kylecordes.com/2007/05/16/remote-svnadmin-dump/">an approach using SVK to remotely clone and then “svnadmin dump” an SVN repositor</a>y. It turns out that there is an easier way “in the box” in SVN 1.4: the svnsync tool. <a href="http://bob.pythonmac.org/archives/2006/09/14/svnsync-mirror-your-svn-repository/">Bob Ippolito describes how to do it</a>, here are the minimal steps:</p>
<p>$ MYREPO=/home/me/someplace    (do not use ~username, use /home/username)<br />
$ svnadmin create $MYREPO<br />
$ echo &#8220;#!/bin/sh&#8221; >$MYREPO/hooks/pre-revprop-change<br />
$ chmod +x $MYREPO/hooks/pre-revprop-change<br />
$ svnsync init file://$MYREPO http://SVN.remote.url.goes.here/<br />
$ svnsync sync file://$MYREPO</p>
<p>&#8230; then repeat the &#8220;svnsync sync&#8221; to sync down the changes since last time, perhaps in a cron job.</p>
<p><a href="http://paul.querna.org/">Paul Querna</a> <a href="http://journal.paul.querna.org/articles/2006/09/14/using-svnsync">describes some caveats</a>, and <a href="http://blog.codefront.net/about/">Cheah Chu Yeow</a> offers a <a href="http://blog.codefront.net/2007/03/31/setting-up-svnsync-ed-mirrored-svn-repositories-on-ubuntu-part-2-of-2/">longer walkthrough of a more &#8220;produciton-grade&#8221; svnsync setup</a>.</p>
<p>Like the SVK approach, with synsync you get a local mirror of a remote repo, with no need for shell access to that repo – very helpful if the repo is hosted by, for example, a <a href="http://cvsdude.com/product.pl?gclid=CK-9kpCKzYwCFRlmWAod6WF8tQ">SVN hosting firm</a>, SourceForge, or Google Code. This local mirror can be used to view project history without network access, to svnadmin dump for backups, to mirror efficiently in another source control tool (I’m doing this with git as a test now, for one of our projects), etc.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2007/svnsync-svn-backup/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Linus Torvalds explains distributed source control</title>
		<link>http://kylecordes.com/2007/linux-git-distributed</link>
		<comments>http://kylecordes.com/2007/linux-git-distributed#comments</comments>
		<pubDate>Thu, 17 May 2007 14:00:42 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[commentary]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[source-control]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2007/05/17/linux-git-distributed/</guid>
		<description><![CDATA[On several occasions over the last year, I&#8217;ve pointed out that distributed source control tools are dramatically better than centralized tools. It&#8217;s quite hard for me to explain why. This is probably because of sloppy and incomplete thinking on my part, but it doesn’t help that most of the audiences / people I&#8217;ve said this [...]]]></description>
			<content:encoded><![CDATA[<p>On several occasions over the last year, I&#8217;ve pointed out that distributed source control tools are dramatically better than centralized tools. It&#8217;s quite hard for me to explain why. This is probably because of sloppy and incomplete thinking on my part, but it doesn’t help that most of the audiences / people I&#8217;ve said this to, have never used a distributed tool. (I&#8217;ve been trying out <a href="http://svk.bestpractical.com/view/HomePage">SVK</a>, <a href="http://bazaar-vcs.org/">bzr</a>, git, etc.) Fortunately, I no longer need to stumble with attempts at explaining this; instead, the answer is to watch as:</p>
<p><a href="http://www.youtube.com/watch?v=4XpnKHJAok8">Linus Torvalds explains distributed source control in general, and git in particular, at Google</a></p>
<p>Here are some of his points, paraphrased. They might not be clear without watching the video.</p>
<ul>
<li>He hates CVS</li>
<li>He hates <a href="http://subversion.tigris.org/">SVN</a> too, since it&#8217;s &#8220;CVS done right&#8221;, because you can&#8217;t get anywhere good from there.</li>
<li>If you need a commercial tool, <a href="http://www.bitkeeper.com/">BitKeeper</a> is the one you should use.</li>
<li>Distributed source control is much more important than which tool you choose</li>
<li>He looked at a lot of alternatives, and immediately tossed anything not distributed, slow, or which does not guarantee that what goes in, comes out [using secure hashes]</li>
<li>He liked Monotone, but it was too slow</li>
<li>With a distributed tool, no single place is vital to your data</li>
<li>Centralized does not scale to Linux-kernel sized projects</li>
<li>Distributed tools work offline, with full history</li>
<li>Branching is not an esoteric, rare event &#8211; everyone branches all the time every time they write a line of code &#8211; but most tools don&#8217;t understand this, they only understand branching as a Very Big Deal.</li>
<li>Distributed tools serve everyone; everyone has “commit” access to their branches. Everyone has all of the tool’s features, rather than only a handful of those with special access.</li>
<li>Of course noone else will necessarily adopt your changes; using a tool in which every developer has the full feature set, does not imply anarchy.</li>
<li>Merging works like security: as a network of trust</li>
<li>Two systems worth looking at: <a href="http://git.or.cz/">git</a> and <a href="http://www.selenic.com/mercurial/wiki/">Mercurial</a>. The others with good features are too slow [for large projects].</li>
<li>Lots of people are using git for their own work (to handle merges, for example), inside companies where the main tools is SVN. git can pull changes from (and thus stay in sync with) SVN.</li>
<li>Git is now much easier to use than CVS or other common tools</li>
<li>Git makes it easier to merge than other tools. So the problem of doing more merging, is not much of a problem, not something you need to fear.</li>
<li>Distributed tools are much faster because they don’t have to go over the network very often. Not talking to a server, is tremendously faster, than talking to even a high end server over a fast network.</li>
<li>SVN working directories and repositories are quite large, git equivalents are much smaller</li>
<li>The repository (=project) is the unit of checkout / commit / etc.; don’t put them all in to on repository. The separate repositories can share underlying storage.</li>
<li>Performance is not secondary. It affect everything you do, it affects how you use an application. Faster operations = merging not a big deal = more, smaller changes.</li>
<li>SVN “makes branching really cheap”. Unfortunately, “merging in SVN is a complete disaster”. “It is incredible how stupid these people are”</li>
<li>Distributed source control is mostly inherently safer: no single point of failure, secure hashes to protect from even intentional malicious users.</li>
<li>“I would never trust Google to maintain my source code for me” – with git (and other distributed systems) the whole history is in many places, nearly impossible to lose it.</li>
</ul>
<p>My own observations:</p>
<p>There are important differences between source control tools. I have heard it said that these are all “just tools” which don’t matter, you simply use whatever the local management felt like buying.  That is wrong: making better tool choices will make your project better (cheaper, faster, more fun, etc.), making worse tool choices will make your project worse (more expensive, slower, painful, higher turnover, etc.)</p>
<p>Distributed tools make the “network of trust” more explicit, and thus easier to reason about.</p>
<p>I think there is an impression out there that distributed tools don&#8217;t accomodate the level of control that &#8220;enterprise&#8221; shops often specify in their processes, over how code is managed. This is a needless worry; it is still quite possible to set up any desired process and controls for the the official repositories. The difference is that you can do that, without the collateral damage of taking away features from individual developers.</p>
<p>Git sounds like the leading choice on Linux, but at the moment it is not well supported on Windows, and I don’t see any signs of that changing anytime soon. I will continue working with bzr, SVK, etc.</p>
<p>There is widespread, but mostly invisible demand for better source control. Over the next few years, the hegemony of the legacy (centralized) design will be lessened greatly. One early adopter is Mozilla, which is switching (or has switched?) to Mercurial. Of course, many projects and companies (especially large companies) will hang on for years to come, because of interia and widespread tool integration.</p>
<p>Several of the distributed tools (SVK, bzr, git, probably more) have the ability to pull changes from other systems, including traditional centralized systems like SVN. These make it possible to use a modern, powerful tool for your own work, even when you are working on a project where someone else has chosen such a traditional system for the master repository.</p>
<p><strong>Update</strong>: <a href="http://www.ociweb.com/mark/">Mark</a> commented that he doesn&#8217;t feel like he has really commited a changeset, until it is on a remote repository. I agree. However, this is trivial: with any of the tools you can push your change from your local repository to a remote one (perhaps one for you alone), with one command. With some of them (bzr, at least) you can configure this to happen automatically, so it is zero extra commands. This <strong>does not negate the benefits</strong> of a local repository, because you can still work offline, and all read operations still happen locally and far more quickly.</p>
<p><strong>Update</strong>: I didn&#8217;t mention <a href="http://www.selenic.com/mercurial/">Mercurial</a> initially, but I should have (thanks, Alex). It is another strong contender, and Mozilla recently chose it. Its feature set is similar to git&#8217;s, but with more eager support for Windows.</p>
<p><strong>Update</strong>: There is another <a href="http://codicesoftware.blogspot.com/2007/05/linus-torvalds-on-git-and-scm.html">discussion of Linus&#8217;s talk over on Codice Software&#8217;s blog</a>, which was <a href="http://developers.slashdot.org/article.pl?sid=07/06/03/004214">linked on Slashdot</a>. Since Codice sells a source control product, the Slashdot coverage is a great piece of free publicity.</p>
<p><strong>Update</strong>: Mark Shuttleworth pointed out below that <a href="http://bazaar-vcs.org/">bzr</a> is much faster than it used to be, and that it has top-notch renaming support; which he <a href="http://www.markshuttleworth.com/archives/123">explains in more detail</a> on in a post. Bzr was already on my own short-list, I am using it for a small project here at Oasis Digital.</p>
<p><strong>Update</strong>: I&#8217;ve started gathering notes about git, bzr, hg, etc., for several upcoming posts (and possibly a talk or two). If you&#8217;re interested in these, subscribe to the feed using the links in the upper right of <a href="http://kylecordes.com/">my home page</a>.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2007/linux-git-distributed/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Use SVK to remotely &#8220;svnadmin dump&#8221; an SVN repository</title>
		<link>http://kylecordes.com/2007/remote-svnadmin-dump</link>
		<comments>http://kylecordes.com/2007/remote-svnadmin-dump#comments</comments>
		<pubDate>Wed, 16 May 2007 16:41:31 +0000</pubDate>
		<dc:creator>Kyle Cordes</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[source-control]]></category>

		<guid isPermaLink="false">http://kylecordes.com/2007/05/16/remote-svnadmin-dump/</guid>
		<description><![CDATA[One of the nice things about SVN is how easy it is to carry the complete SVN history from one server to another: “svnadmin dump” produces a single (large) dump file with the complete history, then “svnadmin load” to recreate it on the new machine. However, for a handful of our projects we have an [...]]]></description>
			<content:encoded><![CDATA[<p>One of the nice things about SVN is how easy it is to carry the complete SVN history from one server to another: “svnadmin dump” produces a single (large) dump file with the complete history, then “svnadmin load” to recreate it on the new machine. However, for a handful of our projects we have an SVN repository hosted on a machine where we don’t have shell access to run svnadmin.</p>
<p>After considerable Google searching, I found that SVN itself offers no way to do this; svnadmin takes these parameters:</p>
<p>svnadmin dump path-to-repos</p>
<p>and only works on local repositories. I found some mailing list discussion about it, but unfortunately it was of this form:</p>
<p><em>user</em>: “I’d like to do X”</p>
<p><em>developer</em>: “You don’t need to do X, it works like Y”</p>
<p>Fortunately, this <a href="http://moelhave.dk/2006/07/remote-mirroring-a-subversion-svn-repository/">post</a> from <a href="http://www.brics.dk/~thomasm/">Thomas Mølhave</a> explains how to use <a href="http://svk.bestpractical.com/view/HomePage">SVK</a> to accomplish something pretty close (though not quite) to this. It was quite easy on my Ubuntu test machine:</p>
<p>apt-get install svk   (if you don’t have SVK yet)</p>
<p>or</p>
<p>rm -rf ~/.svk  (if you have SVK, but don’t care about your current stuff)</p>
<p>or</p>
<p>mv ~/.svk ~/old.svk  (if you have SVK, get your current config out of the way)</p>
<p>then:</p>
<p>svk ls https://your.svn.URL/here/</p>
<p>svk will prompt you for all the bits of info needed to mirror the SVN repository to your local SVK storage, then list the top level files/directories. Next, take advantage of the fact that SVK uses SVN’s underlying storage mechanism, and dump that local SVK mirror, skipping revision 1 which contains SVK metadata:</p>
<p>svnadmin dump -r2:HEAD ~/.svk/local >something.dump</p>
<p>This dump can now be restored elsewhere with “svnadmin load”. Unfortunately the pathnames in it will be mangled, with the original SVN repository hostname and path prepended. For my purposes, this didn’t matter, as I only needed to make it available for occasional reference. You could of course use “svn mv” to clean it up.</p>
<p>On a broader note, SVK looks like a very fine distributed source control tool. On a single developer project I recently droppen SVN in favor of <a href="http://bazaar-vcs.org/">bzr</a>, a distributed source control tool; one of these days I will choose such a tool for a larger project.</p>
<p><strong>Update</strong>: I discuss another method for remote SVN backups, svnsync in a <a href="http://kylecordes.com/2007/06/08/svnsync-svn-backup/">later post</a>.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://kylecordes.com/2007/remote-svnadmin-dump/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

