<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kiririmode</author_name>
  <author_url>https://blog.hatena.ne.jp/kiririmode/</author_url>
  <blog_title>理系学生日記</blog_title>
  <blog_url>https://kiririmode.hatenablog.jp/</blog_url>
  <categories>
    <anon>git</anon>
  </categories>
  <description>git rm -rをスクリプトに組み込む中で、「このディレクトリが存在するかはスクリプト実行時にしかわからない」というケースがありました。 git rmは対象のファイルやディレクトリがない場合、エラーを返却します。これは-fを付与した時も変わりません。 $ git rm hoge fatal: pathspec 'hoge' did not match any files $ git rm -rf hoge fatal: pathspec 'hoge' did not match any files どうしたものかと思いましたが、こういったケースでは--ignore-unmatchを使います。…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkiririmode.hatenablog.jp%2Fentry%2F20210106%2F1609945199&quot; title=&quot;対象ファイルやディレクトリがない時でも`git rm`を正常終了させたい - 理系学生日記&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>2021-01-06 23:59:59</published>
  <title>対象ファイルやディレクトリがない時でも`git rm`を正常終了させたい</title>
  <type>rich</type>
  <url>https://kiririmode.hatenablog.jp/entry/20210106/1609945199</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
