<?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>Tigraine &#187; Git</title>
	<atom:link href="http://www.tigraine.at/category/programmierung/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tigraine.at</link>
	<description>Daniel Hoelbling talks about programming</description>
	<lastBuildDate>Fri, 03 Feb 2012 00:02:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Don&#8217;t commit when you rebase</title>
		<link>http://www.tigraine.at/2011/08/10/dont-commit-when-you-rebase/</link>
		<comments>http://www.tigraine.at/2011/08/10/dont-commit-when-you-rebase/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 09:28:15 +0000</pubDate>
		<dc:creator>Daniel Hölbling</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.tigraine.at/?p=1029</guid>
		<description><![CDATA[One common mistake and my team seem to be doing at times with Git is that we routinely commit after resolving a merge conflict during a rebase. The idea is simple: Instead of doing thousands of merges (thus cluttering the timeline of the project) whenever someone wants to check something into the central repository he [...]]]></description>
			<content:encoded><![CDATA[<p>One common mistake and my team seem to be doing at times with Git is that we routinely commit after resolving a merge conflict during a <code>rebase.</code></p>
<p>The idea is simple: Instead of doing thousands of merges (thus cluttering the timeline of the project) whenever someone wants to check something into the central repository he fetches the remote changes and applies his local changes onto the remote ones.</p>
<p>Thanks to Visual Studio and it&#8217;s way of having every source file referenced from the .csproj files (I hate that btw), we routinely get merge conflicts on the project files that need to be manually resolved. During a rebase this means the rebase will stop on the commit that caused the conflict and you have to fix it.</p>
<p>After you are done with fixing the conflict (usually it&#8217;s just removing the conflict markers Git inserted) you then have to add the now merged file to the index (aka <a href="http://book.git-scm.com/1_the_git_index.html">staging area</a>) and hit <code>git rebase --continue</code>.<br />
Problem is: Since it&#8217;s just a special state of a repository you can just as easily do the following:</p>
<blockquote><p><code>git add -A<br />
git commit</code></p></blockquote>
<p>Good job you just put your repository into limbo mode and your merge is gone .. You recorded a commit onto your <code>rebase-HEAD</code> and you can&#8217;t continue the rebase because the rebase head is no longer where it belongs to.. So once you try to do <code>git rebase --continue</code> git will tell you: &#8220;<strong>No changes &#8211; did you forget to use &#8216;git add&#8217;?</strong>&#8221; And when you run <code>git status</code> you&#8217;ll see: &#8220;<strong>Not currently on any branch. nothing to commit</strong>&#8221;</p>
<p>Your only avenue here is:</p>
<blockquote><p><code>git rebase --abort<br />
git checkout master<br />
git rebase origin/master<br />
... redo the merge<br />
git rebase --continue</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.tigraine.at/2011/08/10/dont-commit-when-you-rebase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I moved to Git from Mercurial</title>
		<link>http://www.tigraine.at/2010/10/10/why-i-moved-to-git-from-hg/</link>
		<comments>http://www.tigraine.at/2010/10/10/why-i-moved-to-git-from-hg/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 21:53:16 +0000</pubDate>
		<dc:creator>Daniel Hölbling</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.tigraine.at/?p=960</guid>
		<description><![CDATA[Believe it or not, my first encounter with distributed version control was through Mercurial. At the time I was used to SVN and Mercurial (hg) opened my eyes to the painless ways of the DVCS. And while I was very content with the way Mercurial worked, I still had to make sacrifices to the way [...]]]></description>
			<content:encoded><![CDATA[<p>Believe it or not, my first encounter with distributed version control was through <a href="http://mercurial.selenic.com/">Mercurial</a>. At the time I was used to <span class="caps">SVN</span> and Mercurial (hg) opened my eyes to the painless ways of the <span class="caps">DVCS</span>. And while I was very content with the way Mercurial worked, I still had to make sacrifices to the way the tool worked.</p>
<p>After seeing some .<span class="caps">NET</span> <span class="caps">OSS</span> projects on GitHub, and following <a href="http://github.com">GitHub</a> and <a href="http://bitbucket.org">BitBucket</a> for some time it became clear that GitHub is much more active than BitBucket. So I decided to try out Git and see for myself why everyone is making a fuss about GitHub, and behold: I liked it!</p>
<p>While hg pretty much feels like Subversion but more awesome, Git manages to loose that feeling. Especially the flexibility that git allows through it’s <a href="http://www.tigraine.at/2010/09/15/git-unstaging-all-changes-and-reset-the-working-tree/">index</a> made it immediately feel “right”. Here is why:</p>
<h3>Forgettable me</h3>
<p>Sadly, I forget things all the time. And this is especially true while working. Sometimes I commit something and forget to save my Visual Studio project, so my commit only contains loose files. In hg, like in <span class="caps">SVN</span>, you are screwed and have to commit a second time to make things right. It’s embarrassing when others see your history littered with “Doh, forget to save XY” commits.</p>
<p>Git solved this with it’s <code>git commit --amend</code> that allows me to add stuff to the previous commit with no hassle. Hg treats all commits as immutable, and that’s just not how I tend to work. I’m stupid, and my tools have to reflect that!</p>
<p>Caveat: You should <span class="caps">NEVER</span> mess around with published history. If you amend a commit that is already in a public repository, everyone that pulled that commit will have a very hard time merging with any upstream changes you start to introduce. Just don’t do it, once you push you are committed!</p>
<h3>Staging</h3>
<p>Same story, different setting. Besides forgetting to commit something, I sometimes even forget to commit at all. You get into the flow of things, and once you look up you finished 3 things that better go into individual commits. With git you can simply add individiual files (or even individual lines inside the files) to the index, commit, repeat until no uncommitted files are left.</p>
<p>This feature is awesome, and it allows a great deal of flexibility without having to think about “damn am I doing too much for one commit?”. It’s like above: I don’t have to think how the tool wants me to behave, I can make my tool behave like I need it do easily.</p>
<p>Mercurial can also do this, but you end up with <code>hg commit --include fileA fileB ...</code> and that’s just not as simple as the Git index.</p>
<p>And that’s just all about it. I went with hg first because people told me that it’s better on Windows, but when I moved to Git afterwards I didn’t notice any problems. Speed is pretty much the same, so you can just pick and choose what you like regardless of platform.</p>
<p>I simply chose Git because it does not interfere with the way I work, and because it makes it easy to fix my screwups afterwards.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tigraine.at/2010/10/10/why-i-moved-to-git-from-hg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git: Unstaging all changes and reset the working tree</title>
		<link>http://www.tigraine.at/2010/09/15/git-unstaging-all-changes-and-reset-the-working-tree/</link>
		<comments>http://www.tigraine.at/2010/09/15/git-unstaging-all-changes-and-reset-the-working-tree/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 14:55:28 +0000</pubDate>
		<dc:creator>Daniel Hölbling</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.tigraine.at/2010/09/15/git-unstaging-all-changes-and-reset-the-working-tree/</guid>
		<description><![CDATA[When you commit something to git you first have to stage (add to the index) your changes. This means you have to git add all the files you want to have included in this commit before git considers them part of the commit. To some this added complexity feels like a burden, but to me [...]]]></description>
			<content:encoded><![CDATA[<p>When you commit something to git you first have to stage (add to the index) your changes. This means you have to git add all the files you want to have included in this commit before git considers them part of the commit. To some this added complexity feels like a burden, but to me it’s a blessing.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 10px 3px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="git working dir / index / repository diagram" src="http://www.tigraine.at/wp-content/uploads/2010/09/image6.png" width="640" height="330" /></p>
<p>Ever forgot that you just did 2 distinct features that really should be in 2 different commits? Well, just add the changes of the first feature, commit, repeat for the second commit and you have everything organized the way you want it to show up in your history. </p>
<p>But: You usually don’t do individual <em>git add</em> commands anyway, if you are anything like me you just hit <em>git add –A </em>(adding all changes in the working directory) and while writing the commit message you realize that there are two files that should not go into this commit. But how do you remove something from the index? </p>
<p>Since you used <em>git add</em> to put them in the index it would be logical to use<em> git rm</em>? Wrong! <em>Git rm</em> will simply delete the file and add the deletion to the index. Meet: </p>
<p><strong><u>git reset </u></strong></p>
<p><font style="font-size: 10.5pt">As with all things in git, git reset can be used in a number of ways. So here is the most common usage in day to day usage:</font></p>
<p><strong>git reset</strong> : Clears your index, leaves your working directory untouched. (simply unstaging everything)</p>
<p><strong>git reset &#8211;hard</strong> : Clears your index, reverts all changes in your working directory to the last commit. (the same thing as svn revert would do)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tigraine.at/2010/09/15/git-unstaging-all-changes-and-reset-the-working-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using git from Powershell just got easier: Posh-git</title>
		<link>http://www.tigraine.at/2010/09/01/using-git-from-powershell-just-got-easier-posh-git/</link>
		<comments>http://www.tigraine.at/2010/09/01/using-git-from-powershell-just-got-easier-posh-git/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 15:23:09 +0000</pubDate>
		<dc:creator>Daniel Hölbling</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.tigraine.at/2010/09/01/using-git-from-powershell-just-got-easier-posh-git/</guid>
		<description><![CDATA[Whenever someone asks me at the end of my git presentation about what tools to use with git my answer was always be the same: Learn to use the commandline. It’s by far the most convenient way to get stuff done. That’s the way git was intended to be used, and with msysgit and Powershell [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever someone asks me at the end of my <a href="http://docs.com/17U1">git presentation</a> about what tools to use with git my answer was always be the same:</p>
<p>Learn to use the commandline. It’s by far the most convenient way to get stuff done. That’s the way git was intended to be used, and with msysgit and Powershell you get a pretty powerful shell to do your stuff. I work exclusively from the commandline, rarely using gitk to take a look at the history.    <br />Unfortunately the basic Windows commandline (cmd) is just awful and outdated. And while some people swear by the MinGW stuff, I loathe the Unix commandline. So Powershell was the only good way for me on Windows to use git. </p>
<p>Now, thanks to some great work from <a href="http://solutionizing.net/">Keith Dahlby</a>, <a href="http://www.markembling.info/">Jeremy Skinner</a> and <a href="http://www.jeremyskinner.co.uk/">Mark Embling</a> using git from Powershell just got a whole lot more comfortable with <a href="http://github.com/dahlbyk/posh-git">Posh-Git</a>.</p>
<p>Documentation is still a bit sparse, but Posh-Git at it’s core gives you two things: It modifies your Powershell prompt to display relevant git information (branch name and staged/unstaged changes) and adds tab-completion to all git commands. Tab completion also works on branches so you can even hit tab on a git checkout and it will auto-complete to a branch. Really really nice I have to say.</p>
<p>Here is how my git shell looks like now with Posh-Git:</p>
<p><a href="http://www.tigraine.at/wp-content/uploads/2010/09/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.tigraine.at/wp-content/uploads/2010/09/image_thumb.png" width="498" height="81" /></a></p>
<p>Once you have changes it will display them also on the prompt:</p>
<p><a href="http://www.tigraine.at/wp-content/uploads/2010/09/image1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.tigraine.at/wp-content/uploads/2010/09/image_thumb1.png" width="569" height="69" /></a></p>
<p>(Meaning: 1 new file, 1 deleted and 0 old ones changed)</p>
<p><strong>Installing</strong></p>
<p>Unfortunately not everyone is a Powershell buff like Keith and friends, so I had a bit of trouble finding out how to set up Posh-Git. Actually, it’s dead simple, but nobody told me: Just put all files from the <a href="http://github.com/dahlbyk/posh-git">Posh-Git repository</a> into the folder:</p>
<blockquote><p><em>C:\Users\&lt;username&gt;\Documents\WindowsPowerShell\</em></p>
</blockquote>
<p>And rename the file <em>profile.example.ps1</em> to <em>Microsoft.PowerShell_profile.ps1</em>. If you already had a PowerShell_profile.ps1 file set up with some custom settings, you can just add the code from profile.example.ps1 to your existing profile (assuming you didn’t change your prompt before).</p>
<p>After that, restart your Powershell prompt and enjoy!</p>
<p><strong>Important: </strong></p>
<p>The latest Posh-Git is only working with git 1.7.1 and higher, so if you are still running the 1.7.0.2 release you have to use the <a href="http://github.com/dahlbyk/posh-git/zipball/v0.2">v0.2 Posh-Git</a> release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tigraine.at/2010/09/01/using-git-from-powershell-just-got-easier-posh-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Source Control Provider for Visual Studio 2010</title>
		<link>http://www.tigraine.at/2010/05/30/git-source-control-provider-for-visual-studio-2010/</link>
		<comments>http://www.tigraine.at/2010/05/30/git-source-control-provider-for-visual-studio-2010/#comments</comments>
		<pubDate>Sun, 30 May 2010 21:40:56 +0000</pubDate>
		<dc:creator>Daniel Hölbling</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.tigraine.at/2010/05/30/git-source-control-provider-for-visual-studio-2010/</guid>
		<description><![CDATA[During my presentation at Barcamp Vienna today I got asked what GUI to use with Git. My plain and simple answer was: “Use the command line, its just better that way.. “. Well, after the talk Andreas approached me and raised a very good point: Mainstream adoption of tools (like Git) often depends on GUIs [...]]]></description>
			<content:encoded><![CDATA[<p>During <a href="http://www.tigraine.at/2010/05/30/barcamp-vienna-2010/">my presentation at Barcamp Vienna</a> today I got asked what GUI to use with Git. My plain and simple answer was: “Use the command line, its just better that way.. “. Well, after the talk <a href="http://www.andreas-schlapsi.com/">Andreas</a> approached me and raised a very good point: Mainstream adoption of tools (like Git) often depends on GUIs to help people during the transition phase. </p>
<p>Besides the obvious Guis like TortoiseGit or GitGui there is now one more tool aimed at .NET developers to make the transition easier: <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/63a7e40d-4d71-4fbb-a23b-d262124b8f4c">Git Source Control Provider for Visual Studio 2010</a>. It looks like Microsoft got VS2010 extensibility right this time, and someone managed to implement Git integration right into the VS2010 solution explorer:</p>
<p><img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="Git Source Control Provider" src="http://visualstudiogallery.msdn.microsoft.com/en-us/63a7e40d-4d71-4fbb-a23b-d262124b8f4c/image/file/29104/1/screenshot.png?Id=29104" /></p>
<p>The Plugin is available through Visual Studio Gallery and seems to be Ms-Pl licensed and free, although I couldn’t find the code anywhere, it’s still worth checking out: <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/63a7e40d-4d71-4fbb-a23b-d262124b8f4c">Git Source Control Provider</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tigraine.at/2010/05/30/git-source-control-provider-for-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Barcamp Vienna 2010</title>
		<link>http://www.tigraine.at/2010/05/30/barcamp-vienna-2010/</link>
		<comments>http://www.tigraine.at/2010/05/30/barcamp-vienna-2010/#comments</comments>
		<pubDate>Sun, 30 May 2010 19:39:39 +0000</pubDate>
		<dc:creator>Daniel Hölbling</dc:creator>
				<category><![CDATA[Barcamp]]></category>
		<category><![CDATA[dotless]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.tigraine.at/2010/05/30/barcamp-vienna-2010/</guid>
		<description><![CDATA[I just booted my PC after 4 hours of drive through heavy rain and thunderstorms back from Vienna where I attended Barcamp. I have to say it was just fantastic! All Barcamps I attended before had a very diverse crowd, but usually lacking developers thus the social media enthusiasts usually dominated the attendees. Barcamp Vienna [...]]]></description>
			<content:encoded><![CDATA[<p>I just booted my PC after 4 hours of drive through heavy rain and thunderstorms back from Vienna where I attended Barcamp. I have to say it was just fantastic! All Barcamps I attended before had a very diverse crowd, but usually lacking developers thus the social media enthusiasts usually dominated the attendees. </p>
<p>Barcamp Vienna was different, maybe it was the awesome location at Microsoft Austria headquarters or just the fact that it was in Vienna.. But I met more coders there in 2 days than in the last 2 yeas in Klagenfurt. </p>
<p>Coolest thing, I even met a <a href="http://www.subsonicproject.com/">Subsonic</a> developer: <a href="http://github.com/saintedlama">Saintedlama</a>! That was really awesome and funny when we met during breakfast randomly chatting about our stuff and I noted that I’ll be <a href="http://www.tigraine.at/2010/05/22/presenting-dotless-at-barcamp-vienna/">presenting dotless</a> when he said: “Wow that’s you? I wanted to contact you for some time now about dotless. I’m working on Subsonic btw.. &quot; (Imagine my jaw dropping right there.. ). He showed me some really cool demos of the simple repository they introduced in SubSonic 3 and it’s uses with MVC.. and I have to tell you: wow.. Using a ORM was really never so easy.. </p>
<p>Anyway, I really had a great time either chatting up really interesting people or doing my two presentations.    <br />On Saturday I talked about <a href="http://wwww.dotlesscsss.com">dotless</a> while on Sunday I talked about <a href="http://git-scm.org">Git</a>. Both talks went great in my opinion, but if anyone was there and has additional feedback on my presentations I’d be glad to hear them. I uploaded both slide decks to <a href="http://www.docs.com">http://www.docs.com</a> and you can find them here:</p>
<p><a href="http://docs.com/17TX"><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://www.tigraine.at/wp-content/uploads/2010/05/image1.png" width="156" height="122" /></a> </p>
<p><a href="http://docs.com/17TX">dotless – CSS done right</a></p>
<p><a href="http://docs.com/17U1"><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://www.tigraine.at/wp-content/uploads/2010/05/image2.png" width="148" height="120" /></a> </p>
<p><a href="http://docs.com/17U1">Git</a></p>
<p>At any rate: Thanks to <a href="http://wissenbelastet.com/">Max</a> and <a href="http://rolfgeneratedcontent.com/">Rolf</a> for organizing this awesome event and to Microsoft for so generously hosting it! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tigraine.at/2010/05/30/barcamp-vienna-2010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Displaying git branch in your powershell prompt</title>
		<link>http://www.tigraine.at/2010/05/16/displaying-git-branch-in-your-powershell-prompt/</link>
		<comments>http://www.tigraine.at/2010/05/16/displaying-git-branch-in-your-powershell-prompt/#comments</comments>
		<pubDate>Sun, 16 May 2010 11:50:13 +0000</pubDate>
		<dc:creator>Daniel Hölbling</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.tigraine.at/2010/05/16/displaying-git-branch-in-your-powershell-prompt/</guid>
		<description><![CDATA[When I started out with git I didn’t start using the commandline right away. I fiddled around with TortoiseGit and GitGui quite a bit before I found out that it’s just so much faster to do all those things from the commandline. As we all know, the windows commandline is not the most powerful thing [...]]]></description>
			<content:encoded><![CDATA[<p>When I started out with git I didn’t start using the commandline right away. I fiddled around with TortoiseGit and GitGui quite a bit before I found out that it’s just so much faster to do all those things from the commandline. As we all know, the windows commandline is not the most powerful thing on the planet, but I also loathe the unix commandline that comes installed with git (gitbash). Obviously, the only alternative is Powershell so I went with that and am very happy with it. </p>
<p>One thing though: I envied Linux users who could extend their bash prompt to display git specific information directly on the shell. Well, after a bit of digging and through some Stackoverflow articles, I managed to find this:</p>
<p><a href="http://www.tigraine.at/wp-content/uploads/2010/05/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.tigraine.at/wp-content/uploads/2010/05/image_thumb.png" width="523" height="92" /></a> </p>
<p>Powershell is quite extensible, and by placing a file called <em>Microsoft.PowerSehll_profile.ps1</em> in your <em>Documents\WindowsPowerShell</em> folder you can define a function called prompt that allows you to modify your prompt text. </p>
<p>I’ve been using this now for quite some time, so I can’t recall where I found the script before I modified it, but here it is anyway (credit goes to whoever created it in the first place): <a href="http://www.tigraine.at/Microsoft.PowerShell_profile.ps1">Microsoft.PowerShell_profile.ps1</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tigraine.at/2010/05/16/displaying-git-branch-in-your-powershell-prompt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable AutCrlf in MsysGit!</title>
		<link>http://www.tigraine.at/2010/02/03/disable-autcrlf-in-msysgit/</link>
		<comments>http://www.tigraine.at/2010/02/03/disable-autcrlf-in-msysgit/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 12:30:07 +0000</pubDate>
		<dc:creator>Daniel Hölbling</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.tigraine.at/2010/02/03/disable-autcrlf-in-msysgit/</guid>
		<description><![CDATA[Ok, today I got this really cool pull request from Jon Galloway for .less. He did some improvements to the T4 Template for .less so that it will run the template on every build if you want that, or that Visual Studio opens up .less.css files. Cool stuff, and thanks a lot Jon! Of course [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, today I got this really cool pull request from <a href="http://weblogs.asp.net/jgalloway/" target="_blank">Jon Galloway</a> for .less. He did some improvements to the T4 Template for .less so that it will run the template on every build if you want that, or that Visual Studio opens up .less.css files. Cool stuff, and thanks a lot Jon! Of course I quickly looked through the changesets and then went ahead and committed it, but I noticed one novice mistake many people run into with MsysGit on Windows.</p>
<p><a href="http://www.tigraine.at/wp-content/uploads/2010/02/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.tigraine.at/wp-content/uploads/2010/02/image_thumb.png" width="589" height="227" /></a> </p>
<p>I am pretty sure Jon only changed a few lines of code, yet the changeset logs every file in the document as changed, thus making it pretty unreadable. This happened to me a lot when I started out with GIT, and finding the solution to this wasn’t easy either. So here is how to fix your MsysGit.</p>
<p>This is caused by a little setting called <tt>core.AutoCrlf </tt>that is set in <a href="http://code.google.com/p/msysgit/issues/detail?id=21" target="_blank">MsysGit by default to true</a>. MsysGit will then go ahead and localize the line-ending depending on what machine you are running on. This happens on checkout, so even with abolutely zero changes to the repository you’ll see a lot of local changes where there haven’t been any.</p>
<p>Needless to say how stupid this setting is, it only generates a ton of useless insertions and deletions while sticking to the pipe dream that everyone on the team will use the same tools to generate consistent line feeds (I’ve even had issues with only Windows machines and this setting). </p>
<p>Now the solution to this is rather simple:</p>
<p><a href="http://www.tigraine.at/wp-content/uploads/2010/02/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.tigraine.at/wp-content/uploads/2010/02/image_thumb1.png" width="390" height="39" /></a> </p>
<p>By running “<tt>git config –global core.autocrlf false</tt>” you disable this and the text files will not get changed upon checkout. This now means that Visual Studio will maybe ask you to fix inconsistent line endings when opening a file, but it is still better than having your source control screw you over upon checkout.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tigraine.at/2010/02/03/disable-autcrlf-in-msysgit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

