<?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>mcBachmann.de TechBlog &#187; git</title>
	<atom:link href="http://blog.mcbachmann.de/tag/git/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mcbachmann.de</link>
	<description>Der Blog zur Website ;-)</description>
	<lastBuildDate>Wed, 11 Jan 2012 21:12:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>git: Clean .gitignore(d) files from Repository</title>
		<link>http://blog.mcbachmann.de/linux/programming/git-clean-gitignored-files-from-repository</link>
		<comments>http://blog.mcbachmann.de/linux/programming/git-clean-gitignored-files-from-repository#comments</comments>
		<pubDate>Fri, 27 May 2011 14:20:38 +0000</pubDate>
		<dc:creator>Sven Bachmann</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://blog.mcbachmann.de/?p=660</guid>
		<description><![CDATA[To keep a repository clean from temporary files, git users can create a file named .gitignore and define wildcards or absolute paths to let git ignore these files. This works for the most users as expected but it does not remove already checked in files. If you also want to clean up your existing repository [...]]]></description>
			<content:encoded><![CDATA[<p>To keep a repository clean from temporary files, git users can create a file named <b>.gitignore</b> and define wildcards or absolute paths to let git ignore these files. This works for the most users as expected but it does not remove already checked in files. If you also want to clean up your existing repository from these ignored files, there is an easy way to get a list of ignored files. <span id="more-660"></span></p>
<p>Just enter the root of your git repository and enter the following to get a list of files which are otherwise ignored on a <b>git status</b>:<br />
<code><br />
<blockquote>git ls-files -i --exclude-from=.gitignore</p></blockquote>
<p></code></p>
<p>Thanks to <a href="http://stackoverflow.com/questions/466764/show-ignored-files-in-git/467053#467053">VonC (stackoverflow)</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mcbachmann.de/linux/programming/git-clean-gitignored-files-from-repository/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitHub: Merged open repositories from Gitorious to GitHub.</title>
		<link>http://blog.mcbachmann.de/linux/programming/github-merged-open-repositories-from-gitorious-to-github</link>
		<comments>http://blog.mcbachmann.de/linux/programming/github-merged-open-repositories-from-gitorious-to-github#comments</comments>
		<pubDate>Wed, 27 Apr 2011 11:51:35 +0000</pubDate>
		<dc:creator>Sven Bachmann</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[gitorious]]></category>

		<guid isPermaLink="false">http://blog.mcbachmann.de/?p=643</guid>
		<description><![CDATA[Finally I merged my open repositories from Gitorious to GitHub. Gitorious was the first Git-On-The-Web-Repo and was easy to use &#8211; but I like the social features of GitHub a bit more and decided today to switch.]]></description>
			<content:encoded><![CDATA[<p>Finally I merged my open repositories from <a href="https://gitorious.org/~sven">Gitorious</a> to <a href="https://github.com/sven">GitHub</a>. Gitorious was the first Git-On-The-Web-Repo and was easy to use &#8211; but I like the social features of GitHub a bit more and decided today to switch.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mcbachmann.de/linux/programming/github-merged-open-repositories-from-gitorious-to-github/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>git: Only commit parts of a patched file (hunk-checkin)</title>
		<link>http://blog.mcbachmann.de/linux/git-only-commit-parts-of-a-patched-file-hunk-checkin</link>
		<comments>http://blog.mcbachmann.de/linux/git-only-commit-parts-of-a-patched-file-hunk-checkin#comments</comments>
		<pubDate>Sun, 19 Jul 2009 20:02:59 +0000</pubDate>
		<dc:creator>Sven Bachmann</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[split patch]]></category>

		<guid isPermaLink="false">http://blog.mcbachmann.de/?p=344</guid>
		<description><![CDATA[Hi, today I read Og Maciels blog entry on Planet GNOME about how he find out to not checkin a whole changed file with git but include/exclude special parts. This is something I needed in the last time much often, but never thought it exists &#8211; so with git its very easy. Now lets have [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, today I read <a href="http://www.ogmaciel.com/?p=721">Og Maciels blog entry</a> on <em>Planet GNOME</em> about how he find out to not checkin a whole changed file with git but include/exclude special parts. This is something I needed in the last time much often, but never thought it exists &#8211; so with git its very easy.<span id="more-344"></span></p>
<p>Now lets have an example, we call it <strong>story.txt</strong>. It contains the following:</p>
<blockquote><p><code>The New Kitten</p>
<p>After their holidays, Ann and Joe decided to get an malani which should be their everyday joy. They decided to get a cat.</p>
<p>It was about 2 weeks old when they take it home and tried everything to make it feel comfortable.</p>
<p>In the end everybody was happy and they lived long and prosper.</code></p></blockquote>
<p>So after this was checked in, we see the mistakes&#8230; it should be an <strong>animal</strong>, not an <strong>malani</strong> and while we correct this, we also fixed the <strong>2 weeks</strong> &#8211; because a kitten should not be taken from its mother before the <strong>7th week</strong>.</p>
<p>Now we wanted to check in both changes &#8211; but separatly, because the <strong>malani</strong> was a typo and the <strong>2 weeks</strong> were a logical error.</p>
<p>How to do so with git?</p>
<blockquote><p><code>git add --patch story.txt</p>
<p>diff --git a/story.txt b/story.txt<br />
index 74fb958..7d7e63b 100644<br />
--- a/story.txt<br />
+++ b/story.txt<br />
@@ -1,7 +1,7 @@<br />
 The New Kitten</p>
<p>-After their holidays, Ann and Joe decided to get an malani which should be their everyday joy. They decided to get a cat.<br />
+After their holidays, Ann and Joe decided to get an animal which should be their everyday joy. They decided to get a cat.</p>
<p>-It was about 2 weeks old when they take it home and tried everything to make it feel comfortable.<br />
+It was about 7 weeks old when they take it home and tried everything to make it feel comfortable.</p>
<p> In the end everybody was happy and they lived long and prosper.<br />
Stage this hunk [y/n/a/d/s/e/?]? </code></p></blockquote>
<p>This is how <em>git</em> sees it at first &#8211; two changes which belong together, because they are neighbours. But we want to change this, so we use the <em>s</em>-key for <em>split</em>.</p>
<blockquote><p><code>Stage this hunk [y/n/a/d/s/e/?]? s<br />
Split into 2 hunks.<br />
@@ -1,4 +1,4 @@<br />
 The New Kitten</p>
<p>-After their holidays, Ann and Joe decided to get an malani which should be their everyday joy. They decided to get a cat.<br />
+After their holidays, Ann and Joe decided to get an animal which should be their everyday joy. They decided to get a cat.</p>
<p>Stage this hunk [y/n/a/d/j/J/e/?]? y<br />
@@ -4,4 +4,4 @@</p>
<p>-It was about 2 weeks old when they take it home and tried everything to make it feel comfortable.<br />
+It was about 7 weeks old when they take it home and tried everything to make it feel comfortable.</p>
<p> In the end everybody was happy and they lived long and prosper.<br />
Stage this hunk [y/n/a/d/K/e/?]? n</code></p></blockquote>
<p>Now you can easily checkin the first change with <em>git commit</em> and than add the second change with <em>git add story.txt</em> (of course you can also split it again into hunks &#8211; if your changes are bigger).</p>
<p>Good luck and thanks to Og.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mcbachmann.de/linux/git-only-commit-parts-of-a-patched-file-hunk-checkin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

