<?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>byte bohemian &#187; Git</title>
	<atom:link href="http://nicl.net/category/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicl.net</link>
	<description></description>
	<lastBuildDate>Sat, 15 May 2010 20:51:01 +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>git-ing around</title>
		<link>http://nicl.net/2009/10/git-ing-around/</link>
		<comments>http://nicl.net/2009/10/git-ing-around/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 09:24:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Agile software development]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://nicl.net/?p=47</guid>
		<description><![CDATA[The last weeks I had some spare time to play around with the Git source control management system. My interest was aroused by a vote on the Apache Tapestry mailing list to migrate the Tapestry Subversion repository into a Git repository.
After a little more than a glimpse into the capabilities of Git I am quite [...]]]></description>
			<content:encoded><![CDATA[<p>The last weeks I had some spare time to play around with the <a href="http://www.git-scm.com">Git</a> source control management system. My interest was aroused by a vote on the <a href="http://tapestry.apache.org">Apache Tapestry</a> mailing list to migrate the <a href="http://tapestry.apache.org">Tapestry</a> <a href="http://subversion.tigris.org/">Subversion</a> repository into a <a href="http://www.git-scm.com">Git</a> repository.</p>
<p>After a little more than a glimpse into the capabilities of <a href="http://www.git-scm.com">Git</a> I am quite impressed!<span id="more-47"></span>I think I have a quite common background in source code management systems (SCM). I started with CVS at <a href="http://www.fh-wedel.de">university</a> and I really hated it. On my <a href="http://www.sinnerschrader.de">first job</a> I continued with CVS and started to value a good source code management system. </p>
<p>When you are working with a bunch of guys on a large Java/HTML project you can't work without a SCM system. CVS was a good system with some quite nice GUI clients like the <a href="http://www.eclipse.org">Eclipse</a> CVS plugin or <a href="http://www.wincvs.org">WinCVS</a>. </p>
<p>I am not quite aware when, but it was 2004-2005 I initiated a project to update the SCM infrastructure to <a href="http://subversion.tigris.org/">Subversion</a> to address some problems with CVS. If you ever created a major release tag on CVS you'll know what I mean <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
In my opinion <a href="http://subversion.tigris.org/">Subversion</a> is more than a worthy successor to CVS but it has it's own weaknesses.</p>
<p>The greatest weakness is the lack of branches and tags as an additional dimension in the SCM model. This makes at least branching with <a href="http://subversion.tigris.org/">SVN</a> not a very nice task. Tracking the changes of files through branches or tags is not that easy, because <a href="http://subversion.tigris.org/">SVN</a> simulates a branch/tag in the file structure.<br />
On my <a href="http://www.scoyo.de">current job</a> we came across some special <a href="http://subversion.tigris.org/">SVN</a> related problem. <a href="http://subversion.tigris.org/">SVN</a> uses the HTTP protocol for communication between <a href="http://subversion.tigris.org/">SVN</a> client and server. This solves al lot of network related issues, because HTTP is a well known and wide spread protocol. But creates a some new ones. So the synchronization of the working copy can some time, especially for for large binary assets and/or large projects. </p>
<p>But let me emphasize that <a href="http://subversion.tigris.org/">SVN</a> is a great SCM system with very well tool support (<a href="http://www.eclipse.org">Eclipse</a>, <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>, etc.) and a large community. So let's stop <a href="http://subversion.tigris.org/">SVN</a> "bashing" and start with the real topic.</p>
<p><a href="http://www.git-scm.com">Git</a> is a relatively new SCM system. It was started in April 2005 by <a href="http://torvalds-family.blogspot.com">Linus Torvalds</a>. It was created due to the change in license of <a href="http://www.bitkeeper.com">Bit Keeper</a>, so that the linux kernel developers have no longer access to the SCM system.</p>
<p>The main difference between Git and SVN is, that SVN (like CVS) has a centralized model and Git has a decentralized model. What does this mean? In the SVN world you have one (central) repository which keeps track of all versions. In the Git world you have a local repository which can pull or push versioning data with other (remote) repositories. This has some fancy effects on the Git SCM system:</p>
<p>One thing that puzzled me most during my switch form CVS to SVN was the change in the version number. CVS provides for each file a version number (e.g. <code>1.1</code>, <code>1.3.4</code>, etc.) but SVN uses a version number for the whole repository (e.g. <code>47382</code>). This works only because the is one leading instance (repository). Git does not have this central instance so the Version number is a SHA1 id (e.g. <code>f4d267c9374da99c95222a95e203dab6c15a499</code>). I guess you noticed the difference too <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  But this is necessary because you cannot tell which version (number) this other guy half the way around the world created a moment ago. The version is also provided for a defined set of changes when committed. The version tracks the parent version and so you can build a version tree. This this is quite different the the linear model of SVN, where the version number is an integer.</p>
<p>Another effect of the design is, that there is more emphasis on branching and merging. So the Git provides a lost more support for this tasks. Like <code>git stash</code> which pushes the changes on the working copy into a local branch and restores the <code>HEAD</code>. This is quite nice, if you want to store your work to e.g. fix an urgent problem. Of course you can easily create a new named branch of your stashed changes. Needless to say that merging is quite easy in the Git world. Git also provides a good visualization of the different branches and commits. This makes cherry picking quite easy.</p>
<p>Since I am playing around with Git, I realized how SVN is conceptually weak in branching and merging. A <a href="http://software.thomasjacob.de">former colleague</a> mentioned this already in 2004 when the migration at my <a href="http://www.sinnerschrader.de">former employer</a> started. I think I understand him now <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Another nice feature of Git is that you can fetch versioning informations of SVN. So if you have a central SVN repository, you can push and pull version to this repository and keep track of you local work/changes in Git.</p>
<p>Last topic for this blog entry (yeah, all good things must come to an end <img src='http://nicl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) is the Git tool support. Git is a quite nice command line tool. But sometimes I am quite lazy so I want a GUI tool as well. <a href="http://www.eclipse.org">Eclipse</a> is mandatory for any competitor in the SCM game. Let me mention some real surprise: The <a href="http://www.eclipse.org/egit/">EGit</a> Eclipse plugin is the first SCM eclipse plugin (I came across) which could move and rename files and keep track of the version history!<br />
Of course there are various tools for all kind of platforms (e.g. <a href="http://gitx.frim.nl/">GitX</a>, <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a> or <a href="http://sourceforge.net/projects/qgit">qgit</a>).</p>
<p>I guess, I will keep an eye on Git  ...</p>
]]></content:encoded>
			<wfw:commentRss>http://nicl.net/2009/10/git-ing-around/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
