<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Undo on kenji.blog</title><link>http://kenji.blog/en/tags/undo/</link><description>Recent content in Undo on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Wed, 15 May 2024 23:32:43 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/tags/undo/index.xml" rel="self" type="application/rss+xml"/><item><title>How to undo git reset</title><link>http://kenji.blog/en/p/git-reset%E3%82%92%E5%8F%96%E3%82%8A%E6%B6%88%E3%81%99%E6%96%B9%E6%B3%95/</link><pubDate>Wed, 15 May 2024 23:32:43 +0900</pubDate><guid>http://kenji.blog/en/p/git-reset%E3%82%92%E5%8F%96%E3%82%8A%E6%B6%88%E3%81%99%E6%96%B9%E6%B3%95/</guid><description>&lt;img src="http://kenji.blog/p/git-reset%E3%82%92%E5%8F%96%E3%82%8A%E6%B6%88%E3%81%99%E6%96%B9%E6%B3%95/img.png" alt="Featured image of post How to undo git reset" />&lt;h1 id="how-to-undo-git-reset">How to undo git reset
&lt;/h1>&lt;p>If you accidentally run git reset after making a git commit, here is how to undo the git reset (restore the state at the time of the git commit).&lt;/p>
&lt;ol>
&lt;li>Check the commit ID before the reset with &lt;code>git reflog&lt;/code>&lt;/li>
&lt;li>Revert to the state before the reset with &lt;code>git reset --hard HEAD@{number}&lt;/code>&lt;/li>
&lt;/ol>
&lt;p>That&amp;rsquo;s how to undo a git reset.&lt;/p></description></item></channel></rss>