<?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>git-merge &#8211; Accidents Happen</title>
	<atom:link href="https://ah.thameera.com/tag/git-merge/feed/" rel="self" type="application/rss+xml" />
	<link>https://ah.thameera.com</link>
	<description>In the dark</description>
	<lastBuildDate>Mon, 10 Sep 2012 15:22:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">56521109</site>	<item>
		<title>Who was my first parent? [Git]</title>
		<link>https://ah.thameera.com/who-was-my-first-parent-git/</link>
					<comments>https://ah.thameera.com/who-was-my-first-parent-git/#respond</comments>
		
		<dc:creator><![CDATA[thameera]]></dc:creator>
		<pubDate>Mon, 10 Sep 2012 15:22:22 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-merge]]></category>
		<guid isPermaLink="false">http://noisythameera.wordpress.com/?p=80</guid>

					<description><![CDATA[A co-worker of mine had the following tree structure in his git repository and he wanted to get rid of the 2abaf35 and 607f016 commits. The solution is a simple git reset --hard e5e67d0 But, for the sake of fun, I wanted to do it without referring to a SHA value. The HEAD commit has [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>A co-worker of mine had the following tree structure in his git repository and he wanted to get rid of the 2abaf35 and 607f016 commits. The solution is a simple </p>
<pre>git reset --hard e5e67d0</pre>
<p><img decoding="async" src="http://ah.thameera.com/wp-content/uploads/2012/09/git-merged-tree.jpg" alt="" title="git merged tree" width="106" height="110" class="alignnone size-full wp-image-81" /><br />
But, for the sake of fun, I wanted to do it without referring to a SHA value. The HEAD commit has two parents e5e67d0 and 2abaf35. HEAD^ will refer to the first parent and HEAD^2 will refer to the second parent. But how do we know which parent is the first?</p>
<p>According to charon at #git on freenode, <strong>HEAD at the time of invoking the merge will always be the first parent</strong>. This is the left-most (straight line) branch. The remaining commits will be the remaining parents, in the order you specify. So, in this case, </p>
<pre>git reset --hard HEAD^</pre>
<p>would have achieved the same feat.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ah.thameera.com/who-was-my-first-parent-git/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">80</post-id>	</item>
	</channel>
</rss>
