<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yunagi_n</author_name>
  <author_url>https://blog.hatena.ne.jp/yunagi_n/</author_url>
  <blog_title>なつねこメモ</blog_title>
  <blog_url>https://tech.natsuneko.blog/</blog_url>
  <categories>
    <anon>Git</anon>
  </categories>
  <description>たとえば以下のような操作をした後、もともといたブランチに行きたい場合： $ git symbolic-ref --short HEAD main $ git checkout sub-branch $ git symbolic-ref --short HEAD sub-branch 次のような操作を行うことで、元いたブランチ、今回の場合は main に戻れる $ git checkout - Git の 1.6.2 から利用できるので、覚えておくと便利かも。 ちなみに、下記コマンドのショートハンドとして動作している： $ git checkout @{-1} 参考： https://githu…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.natsuneko.blog%2Fentry%2F2022%2F10%2F15%2Fback-to-previous-checked-out-branch&quot; title=&quot;git checkout で、直前にチェックアウトしていたブランチに戻りたい - なつねこメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-10-14 15:00:00</published>
  <title>git checkout で、直前にチェックアウトしていたブランチに戻りたい</title>
  <type>rich</type>
  <url>https://tech.natsuneko.blog/entry/2022/10/15/back-to-previous-checked-out-branch</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
