<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Git</title>
        <link>http://ayende.com/Blog/category/557.aspx</link>
        <description>Git</description>
        <language>en-US</language>
        <copyright>Ayende Rahien</copyright>
        <managingEditor>Ayende@ayende.com</managingEditor>
        <generator>Subtext Version 2.0.0.0</generator>
        <item>
            <title>Git is teh SUCK</title>
            <link>http://ayende.com/Blog/archive/2010/03/03/git-is-teh-suck.aspx</link>
            <description>&lt;p&gt;Today, I had two separate incidents in which my git repository was &lt;a href="http://ayende.com/Blog/archive/2010/03/02/where-do-git-repositories-go-when-they-die.aspx"&gt;corrupted&lt;/a&gt;! To the point that nothing, git fsck or git reflog or git just-work-or-i-WILL-shoot-you didn’t work.&lt;/p&gt;  &lt;p&gt;The first time, there was no harm done, I just cloned my repository again, and moved on. The &lt;em&gt;second&lt;/em&gt; time that it happened, it was after I had ~10 commits locally that weren’t pushed. I had my working copy intact, but I didn’t want to lose the history. I asked around, and got a couple of suggestion to move to mercurial instead, because git has no engineering behind it.&lt;/p&gt;  &lt;p&gt;Based on that feedback, I …&lt;/p&gt;  &lt;p&gt;Oh, wait, it isn’t this sort of a post.&lt;/p&gt;  &lt;p&gt;What I actually did was setup &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;Process Monitor&lt;/a&gt; and watched what git.exe was actually doing. I noticed that it was searching for a .git/objects directory, and couldn’t find it anywhere in the path. Indeed, looking there myself, it appeared clear that there was no objects directory under the .git dir. And checking in other repositories showed that they had it. So now I knew &lt;em&gt;why&lt;/em&gt;, but I still had no idea who the #*@# decided to randomly @#$%( my repository, totally derailing my productivity.&lt;/p&gt;  &lt;p&gt;That is where having multiple personalities come in handy, &lt;em&gt;he&lt;/em&gt; did it. The one that isn’t writing this blog post, at some point during the day, there was a need to zip the repository and send it somewhere. Since the working copy is full of crap, that idiot issued the following: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;ls -R obj | rm –F&lt;/p&gt;    &lt;p&gt;ls -R bin | rm –F&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;(Not the exact commands, the idiot used the UI to do a search &amp;amp; delete). &lt;/p&gt;  &lt;p&gt;You can guess the following from there. At this point, having come to this astounding discovery, I heroically went to the recycle bin, found the objects directory there, and rescued it! All is well, except that there is still a thrashing for uncommon stupidity owed.&lt;/p&gt;  &lt;p&gt;And remember, it wasn’t me, it was the other one who did that!&lt;/p&gt;  &lt;p&gt;And yes, the spelling mistake in the title is intentional.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11347.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2010/03/03/git-is-teh-suck.aspx</guid>
            <pubDate>Wed, 03 Mar 2010 05:55:00 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/11347.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2010/03/03/git-is-teh-suck.aspx#feedback</comments>
            <slash:comments>17</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11347.aspx</wfw:commentRss>
        </item>
        <item>
            <title>I know I broke the build, but that is no reason to be rude</title>
            <link>http://ayende.com/Blog/archive/2009/12/14/i-know-i-broke-the-build-but-that-is-no.aspx</link>
            <description>&lt;p&gt;Sometimes I think that Git is &lt;em&gt;too&lt;/em&gt; smart.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/IknowIbrokethebuildbutthatisnoreasontobe_F492/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/IknowIbrokethebuildbutthatisnoreasontobe_F492/image_thumb_1.png" width="599" height="111" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11240.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/12/14/i-know-i-broke-the-build-but-that-is-no.aspx</guid>
            <pubDate>Mon, 14 Dec 2009 10:00:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/12/14/i-know-i-broke-the-build-but-that-is-no.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11240.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Git commits as code review?</title>
            <link>http://ayende.com/Blog/archive/2009/10/15/git-commits-as-code-review.aspx</link>
            <description>&lt;p&gt;I just had to go through a code base where I had a bunch of of comments. &lt;/p&gt;  &lt;p&gt;Instead of going with the usual route of just noting the changes that I think should be done, I decided to do something else. I fixed each individual change, and commit them individually. &lt;/p&gt;  &lt;p&gt;This is how it looks like, each commit is usually less than a single screen of changes (diff mode).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Gitcommitsascodereview_EB0A/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Gitcommitsascodereview_EB0A/image_thumb.png" width="284" height="618" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I wonder if it is something that I can apply more generally.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11147.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/10/15/git-commits-as-code-review.aspx</guid>
            <pubDate>Thu, 15 Oct 2009 04:40:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/10/15/git-commits-as-code-review.aspx#feedback</comments>
            <slash:comments>13</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11147.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Git renames</title>
            <link>http://ayende.com/Blog/archive/2009/10/11/git-renames.aspx</link>
            <description>&lt;p&gt;One of the things that I like about Git is that I don’t have to think about operations that I make in my source. For example, I am working on the refactoring from NH Prof to ÜberProf, and I wanted to change the directories &amp;amp; project files. So I just went to explorer and renamed them.&lt;/p&gt;  &lt;p&gt;Then I had to fix some namespaces references in the project file. It looks like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Gitrenames_DFF6/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Gitrenames_DFF6/image_thumb.png" width="964" height="329" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice that it capture both the rename and the content change?&lt;/p&gt;  &lt;p&gt;You can also see how it looks in the log file:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Gitrenames_DFF6/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Gitrenames_DFF6/image_thumb_1.png" width="644" height="83" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Trying to do stuff like that with SVN is just PITA, with Git, I didn’t have to &lt;em&gt;think&lt;/em&gt; about it.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11171.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/10/11/git-renames.aspx</guid>
            <pubDate>Sun, 11 Oct 2009 13:57:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/10/11/git-renames.aspx#feedback</comments>
            <slash:comments>11</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11171.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Distributed Source Control</title>
            <link>http://ayende.com/Blog/archive/2009/09/27/distributed-source-control.aspx</link>
            <description>&lt;p&gt;I had a short discussion with &lt;a href="http://unhandled-exceptions.com/blog/"&gt;Steve Bohlen&lt;/a&gt; about distributed source control, and how it differs from centralized source control. After using Git for a while, I can tell you that there are several things that I am not really willing to give up.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;em&gt;Fast&lt;/em&gt; commits&lt;/li&gt;    &lt;li&gt;&lt;em&gt;Local &lt;/em&gt;history&lt;/li&gt;    &lt;li&gt;&lt;em&gt;Easy &lt;/em&gt;merging&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;To be sure, a centralized SCM will have commits, history and merging. But something like Git takes it to a whole new level. Looking at how it changed my workflow is startling. There is no delay to committing, so I can commit every minute or so. I &lt;em&gt;could &lt;/em&gt;do it with SVN, but it would take 30 seconds to a minute to execute, blocking my work, so I use bigger commits with SVN.&lt;/p&gt;  &lt;p&gt;Having local history means that I can &lt;em&gt;deal&lt;/em&gt; with a lot of small commits, because diffing a file from two commits ago is as fast as diffing the local copy. I tend to browse around in the history quite a lot, especially when I am doing stuff like code reviews, or trying to look at how I did something three weeks ago.&lt;/p&gt;  &lt;p&gt;Merging is another thing that DVCS excels at. Not so much because of better merge algorithms (although that is a part of this), but simply because having all the information locally make the merge process so much faster.&lt;/p&gt;  &lt;p&gt;All in all, it end up being a much easier process to work with. It takes time to get used to it, though.&lt;/p&gt;  &lt;p&gt;And given those requirements, &lt;em&gt;Fast&lt;/em&gt; commits, &lt;em&gt;Local &lt;/em&gt;history, &lt;em&gt;Easy &lt;/em&gt;merging, you pretty much end up with a distributed solution. Even with a DVCS, you still have the master repository, but just the fact that you have full local history frees you from having to manage all of that.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11148.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/09/27/distributed-source-control.aspx</guid>
            <pubDate>Sun, 27 Sep 2009 21:05:27 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/09/27/distributed-source-control.aspx#feedback</comments>
            <slash:comments>15</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11148.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Git for OSS projects</title>
            <link>http://ayende.com/Blog/archive/2009/09/14/git-for-oss-projects.aspx</link>
            <description>&lt;p&gt;If I needed more reasons to move to Git, this would be it:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/GitforOSSprojects_4BA9/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/GitforOSSprojects_4BA9/image_thumb_2.png" width="499" height="505" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Just to make things more interesting, a couple of those are pull requests, but the middle is just a patch that I got sent. That patch also include a binary file.&lt;/p&gt;  &lt;p&gt;Automatically tracking who did what and where, even for people who aren’t members of the project? Not having to handle binary files in patches in a special way?&lt;/p&gt;  &lt;p&gt;That is just makes things &lt;em&gt;so&lt;/em&gt; much simpler…&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11102.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/09/14/git-for-oss-projects.aspx</guid>
            <pubDate>Mon, 14 Sep 2009 02:22:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/09/14/git-for-oss-projects.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11102.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Why Git?</title>
            <link>http://ayende.com/Blog/archive/2009/09/04/why-git.aspx</link>
            <description>&lt;p&gt;I have been using Git for the past week or so, enough to get a good handle on its benefits and disadvantages.&lt;/p&gt;  &lt;p&gt;I moved to Git from Subversion, after having done a stint of almost 6 years of using Subversion. A stint which also included doing &lt;a href="http://svnbridge.codeplex.com/"&gt;some development on Subversion&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Despite appearances, I actually took a fairly structured (and long running) approach to learning Git, I got a book and read it, I played around with it, and I mostly dismissed it as “it isn’t solving my problem” and “I already know how source control works”.&lt;/p&gt;  &lt;p&gt;Last week I had the chance to pick &lt;a href="http://codebetter.com/blogs/aaron.jensen/"&gt;Aaron Jensen&lt;/a&gt; mind about Git, and he was able to clear up some conceptual issues about how Git operates. I made a bigger effort since to learn how I can make better use of Git and I think that I now know enough to be able to talk about it.&lt;/p&gt;  &lt;p&gt;First, let me talk about Subversion a little bit. As I said, I am a long time user of Subversion, and I consider it an excellent source control system. It is, however, strongly aimed at meeting corporate development scenarios.&lt;/p&gt;  &lt;p&gt;What do I mean by that? In Subversion, you have the root repository, and everything else falls out from there. That doesn’t sounds like such a problem, until you realize that except for your local working copy, &lt;em&gt;every single operation is a remote operation&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Just to give you an idea why this is a problem, looking up a history of changes (including file diffs) is a real &lt;em&gt;pain &lt;/em&gt;in Subversion. Merging (the actual act, not keeping track of it) is a pretty long operation as well.&lt;/p&gt;  &lt;p&gt;That was the final deal breaker for me. I feel insulted whenever I have to wait for the machine, it should be the other way around, damn it!&lt;/p&gt;  &lt;p&gt;But there are other issues with Subversion usage, specifically, for Open Source projects I don’t believe that the centralized model works anymore.&lt;/p&gt;  &lt;p&gt;Consider the workflow for getting a patch in Rhino Mocks. You get the code, make the patch, send the patch. In the meantime, the project is moving ahead and you are forced to keep up with what is basically a dirty and unversioned working copy.&lt;/p&gt;  &lt;p&gt;Worse, for me, when you send me the patch, it has to go back to the server for any old versions (slow! slow! slow!) and make me do a lot of the work.&lt;/p&gt;  &lt;p&gt;Having a single source of truth is important, for official releases. But in the meantime, I &lt;em&gt;like &lt;/em&gt;the idea of having multiple disparate copies that people are working on independently. They should.&lt;/p&gt;  &lt;p&gt;Some other important thoughts, with absolutely no order:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Local history is another major important aspect. I mentioned that this is something that I sometimes do, and it is a total pain to go through that with Subversion, and it totally painless to do so with Git. I have TortoiseGit installed specifically for that, so I get a UI that I am very familiar with but with no network round tripping time. &lt;/li&gt;    &lt;li&gt;I am not sure how to qualify this point, but it &lt;em&gt;feels&lt;/em&gt; like Git is faster even when it does goes on the network. Project checkouts and remote commits seems to be faster. Even though on the face of it Subversion should be much faster at least for checkouts (Git gets the entire history, Subversion gets a single revision). &lt;/li&gt;    &lt;li&gt;People keep mentioning having private commits as an advantage. I &lt;em&gt;guess&lt;/em&gt; I see the point, but I am not sold on that yet. Sure, it is fun to be able to do that, but this is a paper advantage so far. What I really &lt;em&gt;do&lt;/em&gt; like is that commits are &lt;em&gt;fast&lt;/em&gt;. Which means that in many cases I can commit &amp;amp; push on the background while resuming work. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Github is another consideration, its major advantage is that it is taking care of a lot of details related to actually managing git. &lt;/p&gt;  &lt;p&gt;For open source work, I &lt;em&gt;love&lt;/em&gt; looking at this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/WhyGit_5996/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/WhyGit_5996/image_thumb.png" width="443" height="247" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This gives me a good indication about the actual interest in a project. &lt;/p&gt;  &lt;p&gt;Other things, like pull requests and their management makes me tingle all over, since they represent how people actually work in OSS project in real life and this represent a significant time saving.&lt;/p&gt;  &lt;p&gt;There are other stuff as well, having a download button in the site means that I don’t get questions from people that have no Subversion tools or are behind firewalls.&lt;/p&gt;  &lt;p&gt;Github is also a huge disadvantage since in less than a week I caught it broken at least twice. There are some things that I want to be &lt;em&gt;stable&lt;/em&gt;, the place where I put my source code is one of them, and I don’t &lt;em&gt;care&lt;/em&gt; if the unstable parts aren’t the Git repositories. As far as I am concerned, unstable site equals to nervousness on my part.&lt;/p&gt;  &lt;p&gt;Anyway, those are my reasons for moving to Git. The tooling are pretty good, I got used to the git command line, gitk and git gui fairly quickly. &lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11094.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/09/04/why-git.aspx</guid>
            <pubDate>Fri, 04 Sep 2009 17:22:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/09/04/why-git.aspx#feedback</comments>
            <slash:comments>35</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11094.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Git warning signs</title>
            <link>http://ayende.com/Blog/archive/2009/09/04/git-warning-signs.aspx</link>
            <description>&lt;p&gt;This is what made me leave Subversion:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Gitwarningsigns_DD7/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Gitwarningsigns_DD7/image_thumb.png" width="412" height="81" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Grr!&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11091.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/09/04/git-warning-signs.aspx</guid>
            <pubDate>Fri, 04 Sep 2009 15:58:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/09/04/git-warning-signs.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11091.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>