<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shiba_yu36</author_name>
  <author_url>https://blog.hatena.ne.jp/shiba_yu36/</author_url>
  <blog_title>$shibayu36-&gt;blog;</blog_title>
  <blog_url>https://blog.shibayu36.org/</blog_url>
  <categories>
    <anon>tech</anon>
  </categories>
  <description>gitのworkspace内がcleanかどうか確認してからコマンドを使いたいことがあった。そこで変更があるかをgitでチェックする方法について調べたのでメモ。結論としては以下のようにすると良い。 if [ -z &quot;$(git status --porcelain)&quot; ]; then # Working directory clean else # Uncommitted changes fi perlとかだとこんな感じ。 if (`git status --porcelain`) { warn 'dirty'; } else { warn 'clean'; } ちなみにgit diff --…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.shibayu36.org%2Fentry%2F2017%2F09%2F04%2F084315&quot; title=&quot;gitのworkspaceがcleanかどうかチェックする - $shibayu36-&amp;gt;blog;&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>2017-09-04 08:43:15</published>
  <title>gitのworkspaceがcleanかどうかチェックする</title>
  <type>rich</type>
  <url>https://blog.shibayu36.org/entry/2017/09/04/084315</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
