<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thinca</author_name>
  <author_url>https://blog.hatena.ne.jp/thinca/</author_url>
  <blog_title>永遠に未完成</blog_title>
  <blog_url>https://thinca.hatenablog.com/</blog_url>
  <categories>
    <anon>git</anon>
  </categories>
  <description>GitHub などで Pull Request ベースで開発をしていると、master には間違っても push したくないわけです。 GitHub 側には残念ながら master への push を禁止するような設定はできないので、仕方ないのでクライアント側の Hook で対応しようってことになり、この方法についてググるとこことかこことか、いくつか方法を紹介しているページが出てくるんですが、どれもやり方が間違っている*1ので、正しい方法を紹介。 何がまずいのか 上記に挙げた方法では、細かい部分は違ってたりするけど、git symbolic-ref HEAD を使って現在ブランチを見て、mas…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthinca.hatenablog.com%2Fentry%2F20150306%2F1425639218&quot; title=&quot; master への push を禁止するローカル git hook の正しい書き方 - 永遠に未完成&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>2015-03-06 19:53:38</published>
  <title> master への push を禁止するローカル git hook の正しい書き方</title>
  <type>rich</type>
  <url>https://thinca.hatenablog.com/entry/20150306/1425639218</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
