<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reflog on Commentary of Takao</title><link>https://takao.blog/en/tags/reflog/</link><description>Recent content in Reflog on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Commentary of Takao</copyright><lastBuildDate>Sat, 13 Jun 2026 23:11:50 +0900</lastBuildDate><atom:link href="https://takao.blog/en/tags/reflog/index.xml" rel="self" type="application/rss+xml"/><item><title>Recovering Deleted Branches and Commits using git reflog</title><link>https://takao.blog/en/web/git-recovery-deleted-branch-reflog/</link><pubDate>Sat, 25 Apr 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-recovery-deleted-branch-reflog/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Recovering Deleted Branches and Commits using git reflog" /&gt;&lt;p&gt;&amp;ldquo;I accidentally deleted a local branch using &lt;code&gt;git branch -D&lt;/code&gt;,&amp;rdquo; or &amp;ldquo;I ran &lt;code&gt;git reset --hard HEAD~1&lt;/code&gt; and lost my unpushed commits!&amp;rdquo; If you have worked with Git for any length of time, you have likely experienced one of these stomach-dropping moments.&lt;/p&gt;
&lt;p&gt;While standard &lt;code&gt;git log&lt;/code&gt; commands won&amp;rsquo;t display references to deleted branches or detached commits, you don&amp;rsquo;t need to panic. Git has a built-in safety net called &lt;strong&gt;&lt;code&gt;git reflog&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;</description></item></channel></rss>