<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Git reset, checkout &amp; &quot;bare double dash&quot;, and revert</title>
	<atom:link href="http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Thu, 29 Mar 2012 20:33:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Jason Meridth</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-466</link>
		<dc:creator>Jason Meridth</dc:creator>
		<pubDate>Thu, 25 Mar 2010 02:17:04 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-466</guid>
		<description>@derick

Excellent.  I&#039;m going to update the post to make sure people read your comments so that the knowledge is shared.  Thank you for following up on this.</description>
		<content:encoded><![CDATA[<p>@derick</p>
<p>Excellent.  I&#8217;m going to update the post to make sure people read your comments so that the knowledge is shared.  Thank you for following up on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: derick.bailey</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-465</link>
		<dc:creator>derick.bailey</dc:creator>
		<pubDate>Thu, 25 Mar 2010 01:53:30 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-465</guid>
		<description>@qrush got me squared away: git reset --hard HEAD^

I&#039;ve used reset --hard to clean out my current working set and get back to last commit... just didn&#039;t think about it in this case. i was so fixated on &quot;revert&quot; (from my svn experience) that I couldn&#039;t see past the git revert command.</description>
		<content:encoded><![CDATA[<p>@qrush got me squared away: git reset &#8211;hard HEAD^</p>
<p>I&#8217;ve used reset &#8211;hard to clean out my current working set and get back to last commit&#8230; just didn&#8217;t think about it in this case. i was so fixated on &#8220;revert&#8221; (from my svn experience) that I couldn&#8217;t see past the git revert command.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Meridth</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-464</link>
		<dc:creator>Jason Meridth</dc:creator>
		<pubDate>Wed, 24 Mar 2010 04:11:55 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-464</guid>
		<description>@derick

@qrush responded to your tweet and his solution is easier:

Just create a new branch from the commit on master, prior to the merge, delete master and rename the new branch to master.  this will work if you haven&#039;t deleted the topic you merged into master.</description>
		<content:encoded><![CDATA[<p>@derick</p>
<p>@qrush responded to your tweet and his solution is easier:</p>
<p>Just create a new branch from the commit on master, prior to the merge, delete master and rename the new branch to master.  this will work if you haven&#8217;t deleted the topic you merged into master.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Meridth</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-463</link>
		<dc:creator>Jason Meridth</dc:creator>
		<pubDate>Wed, 24 Mar 2010 03:44:42 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-463</guid>
		<description>@derick

http://www.kernel.org/pub/software/scm/git/docs/howto/revert-a-faulty-merge.txt summarizes this situation.  Wicked stuff.

I&#039;ll be researching this problem in more depth</description>
		<content:encoded><![CDATA[<p>@derick</p>
<p><a href="http://www.kernel.org/pub/software/scm/git/docs/howto/revert-a-faulty-merge.txt" rel="nofollow">http://www.kernel.org/pub/software/scm/git/docs/howto/revert-a-faulty-merge.txt</a> summarizes this situation.  Wicked stuff.</p>
<p>I&#8217;ll be researching this problem in more depth</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: derick.bailey</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-462</link>
		<dc:creator>derick.bailey</dc:creator>
		<pubDate>Wed, 24 Mar 2010 02:38:35 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-462</guid>
		<description>so how do i revert a merge?

i just merged BranchA into Master and realized that I didn&#039;t want to do that... when i run &quot;git revert HEAD^&quot; on master, I get this message:

&quot;fatal: commit (hash#) is a merge but no -m option was given.&quot;

then when i try the -m option i get

&quot;error: switch &#039;m&#039; expects a numerical value&quot; ... for &quot;parent number&quot; ... umm.... what?</description>
		<content:encoded><![CDATA[<p>so how do i revert a merge?</p>
<p>i just merged BranchA into Master and realized that I didn&#8217;t want to do that&#8230; when i run &#8220;git revert HEAD^&#8221; on master, I get this message:</p>
<p>&#8220;fatal: commit (hash#) is a merge but no -m option was given.&#8221;</p>
<p>then when i try the -m option i get</p>
<p>&#8220;error: switch &#8216;m&#8217; expects a numerical value&#8221; &#8230; for &#8220;parent number&#8221; &#8230; umm&#8230;. what?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Meridth</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-461</link>
		<dc:creator>Jason Meridth</dc:creator>
		<pubDate>Wed, 24 Mar 2010 02:09:35 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-461</guid>
		<description>@Alexander

Yep.  That&#039;s another way to do it.  You&#039;ve actually saved me the time of writing a post for that.  I&#039;m going to update this post and make sure people read your comments.

Thank you.</description>
		<content:encoded><![CDATA[<p>@Alexander</p>
<p>Yep.  That&#8217;s another way to do it.  You&#8217;ve actually saved me the time of writing a post for that.  I&#8217;m going to update this post and make sure people read your comments.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander Gro&#223;</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-460</link>
		<dc:creator>Alexander Gro&#223;</dc:creator>
		<pubDate>Wed, 24 Mar 2010 01:20:27 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-460</guid>
		<description>I might add that interactive rebasing can also be done to history that has been pushed (published) to a remote, though its not good or recommended practice. Be aware that you will have to force the next push. Also, it might break history for people who have already pulled your changes.

The git manpages contain documentation on how to recover from an upstream rebase.

http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html</description>
		<content:encoded><![CDATA[<p>I might add that interactive rebasing can also be done to history that has been pushed (published) to a remote, though its not good or recommended practice. Be aware that you will have to force the next push. Also, it might break history for people who have already pulled your changes.</p>
<p>The git manpages contain documentation on how to recover from an upstream rebase.</p>
<p><a href="http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html" rel="nofollow">http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander Gro&#223;</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-459</link>
		<dc:creator>Alexander Gro&#223;</dc:creator>
		<pubDate>Wed, 24 Mar 2010 01:12:13 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-459</guid>
		<description>As long as you didn&#039;t push your changes to a remote you can also undo commits with interactive rebasing. The end result is as if you never did that commit (as opposed o revert, wich adds a &quot;negative&quot; commit).

&gt; git log --oneline -3
123456 foo
567890 bar
abcdef baz

# Say you want to undo the &quot;bar&quot; commit
&gt; git rebase --interactive abcdef

# Your editor opens, allowing you to specify which commits to delete or even edit!
pick 123456 foo
pick 567890 bar
pick abcdef baz

# Delete the line containing &quot;bar&quot; and save your changes. Exit the editor.

# Rebasing...

&gt; git log
ef3478 foo
abcdef baz

Done!</description>
		<content:encoded><![CDATA[<p>As long as you didn&#8217;t push your changes to a remote you can also undo commits with interactive rebasing. The end result is as if you never did that commit (as opposed o revert, wich adds a &#8220;negative&#8221; commit).</p>
<p>> git log &#8211;oneline -3<br />
123456 foo<br />
567890 bar<br />
abcdef baz</p>
<p># Say you want to undo the &#8220;bar&#8221; commit<br />
> git rebase &#8211;interactive abcdef</p>
<p># Your editor opens, allowing you to specify which commits to delete or even edit!<br />
pick 123456 foo<br />
pick 567890 bar<br />
pick abcdef baz</p>
<p># Delete the line containing &#8220;bar&#8221; and save your changes. Exit the editor.</p>
<p># Rebasing&#8230;</p>
<p>> git log<br />
ef3478 foo<br />
abcdef baz</p>
<p>Done!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Meridth</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-458</link>
		<dc:creator>Jason Meridth</dc:creator>
		<pubDate>Tue, 23 Mar 2010 22:02:57 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-458</guid>
		<description>@derick  glad it helped.

@Adam
I mention that at the bottom of the post, but re-iteration never hurts.  Thanks.</description>
		<content:encoded><![CDATA[<p>@derick  glad it helped.</p>
<p>@Adam<br />
I mention that at the bottom of the post, but re-iteration never hurts.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Ford</title>
		<link>http://lostechies.com/jasonmeridth/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert/#comment-457</link>
		<dc:creator>Adam Ford</dc:creator>
		<pubDate>Tue, 23 Mar 2010 21:58:11 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jason_meridth/archive/2010/03/23/git-reset-checkout-amp-quot-bare-double-dash-quot-and-revert.aspx#comment-457</guid>
		<description>git commit --amend is also useful when you made a typo or forgot something in the commit message, as it allows you to edit that as well!</description>
		<content:encoded><![CDATA[<p>git commit &#8211;amend is also useful when you made a typo or forgot something in the commit message, as it allows you to edit that as well!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
