<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tokizuoh</author_name>
  <author_url>https://blog.hatena.ne.jp/tokizuoh/</author_url>
  <blog_title>カルボナーラ街道</blog_title>
  <blog_url>https://tokizuoh.hatenablog.com/</blog_url>
  <categories>
    <anon>dotfiles</anon>
    <anon>Git</anon>
  </categories>
  <description>一年ぶりの盆栽。 github.com 実行環境 $git --version git version 2.45.1 モチベーション 普段、デフォルトブランチ名が異なるリポジトリ間を行き来している。git switchする時にデフォルトブランチ名を思い出す必要があって非効率。エイリアスを作成しよう。 リモートからデフォルトブランチを取得して切り替え $git switch $(git remote show origin | grep &quot;HEAD&quot; | cut -d&quot; &quot; -f5) まぁいけるが、リモートに取得しに行っているので明らかに遅い。 $time sh -c 'git switch $…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftokizuoh.hatenablog.com%2Fentry%2F2024%2F05%2F22%2F095508&quot; title=&quot;dotfiles盆栽記7: デフォルトブランチ名を知らない状態でgit switchする - カルボナーラ街道&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>2024-05-22 09:55:08</published>
  <title>dotfiles盆栽記7: デフォルトブランチ名を知らない状態でgit switchする</title>
  <type>rich</type>
  <url>https://tokizuoh.hatenablog.com/entry/2024/05/22/095508</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
